forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#104102 - Dylan-DPC:rollup-0eakshe, r=Dylan-DPC
Rollup of 6 pull requests Successful merges: - rust-lang#103757 (Mention const and lifetime parameters in error E0207) - rust-lang#103986 (Don't silently eat label before block in block-like expr) - rust-lang#104003 (Move some tests to more reasonable directories) - rust-lang#104038 (Normalize types when deducing closure signature from supertraits) - rust-lang#104052 (Fix `resolution_failure` ICE) - rust-lang#104090 (Modify comment syntax error) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
25 changed files
with
346 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// check-pass | ||
|
||
pub fn foo() {} | ||
|
||
/// [`foo`](Self::foo) //~ WARNING unresolved link to `Self::foo` | ||
pub use foo as bar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
warning: unresolved link to `Self::foo` | ||
--> $DIR/issue-103997.rs:5:13 | ||
| | ||
LL | /// [`foo`](Self::foo) | ||
| ^^^^^^^^^ no item named `Self` in scope | ||
| | ||
= note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default | ||
|
||
warning: 1 warning emitted | ||
|
17 changes: 17 additions & 0 deletions
17
src/test/ui/closures/supertrait-hint-references-assoc-ty.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// check-pass | ||
|
||
pub trait Fn0: Fn(i32) -> Self::Out { | ||
type Out; | ||
} | ||
|
||
impl<F: Fn(i32) -> ()> Fn0 for F { | ||
type Out = (); | ||
} | ||
|
||
pub fn closure_typer(_: impl Fn0) {} | ||
|
||
fn main() { | ||
closure_typer(move |x| { | ||
let _: i64 = x.into(); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
fn a() { | ||
if let () = () 'a {} | ||
//~^ ERROR labeled expression must be followed by `:` | ||
//~| ERROR expected `{`, found `'a` | ||
} | ||
|
||
fn b() { | ||
if true 'a {} | ||
//~^ ERROR labeled expression must be followed by `:` | ||
//~| ERROR expected `{`, found `'a` | ||
} | ||
|
||
fn c() { | ||
loop 'a {} | ||
//~^ ERROR labeled expression must be followed by `:` | ||
//~| ERROR expected `{`, found `'a` | ||
} | ||
|
||
fn d() { | ||
while true 'a {} | ||
//~^ ERROR labeled expression must be followed by `:` | ||
//~| ERROR expected `{`, found `'a` | ||
} | ||
|
||
fn e() { | ||
while let () = () 'a {} | ||
//~^ ERROR labeled expression must be followed by `:` | ||
//~| ERROR expected `{`, found `'a` | ||
} | ||
|
||
fn f() { | ||
for _ in 0..0 'a {} | ||
//~^ ERROR labeled expression must be followed by `:` | ||
//~| ERROR expected `{`, found `'a` | ||
} | ||
|
||
fn g() { | ||
unsafe 'a {} | ||
//~^ ERROR labeled expression must be followed by `:` | ||
//~| ERROR expected `{`, found `'a` | ||
} | ||
|
||
fn main() {} |
Oops, something went wrong.