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#91361 - Mark-Simulacrum:stable-next, r=Mark-S…
…imulacrum [stable] 1.57.0 artifacts This is the standard beta->stable promotion, and includes a last-minute backports of: * rust-lang#90044 via inclusion of rust-lang#91220. * [beta] Don't treat unnormalized function arguments as well-formed rust-lang#91242 r? `@Mark-Simulacrum`
- Loading branch information
Showing
11 changed files
with
172 additions
and
49 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 |
---|---|---|
@@ -1 +1 @@ | ||
beta | ||
stable |
14 changes: 14 additions & 0 deletions
14
src/test/ui/fn/implied-bounds-unnorm-associated-type.nll.stderr
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,14 @@ | ||
error: lifetime may not live long enough | ||
--> $DIR/implied-bounds-unnorm-associated-type.rs:14:5 | ||
| | ||
LL | fn f<'a, 'b>(s: &'b str, _: <&'a &'b () as Trait>::Type) -> &'a str { | ||
| -- -- lifetime `'b` defined here | ||
| | | ||
| lifetime `'a` defined here | ||
LL | s | ||
| ^ returning this value requires that `'b` must outlive `'a` | ||
| | ||
= help: consider adding the following bound: `'b: 'a` | ||
|
||
error: aborting due to previous error | ||
|
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,22 @@ | ||
// check-fail | ||
// See issue #91068. Types in the substs of an associated type can't be implied | ||
// to be WF, since they don't actually have to be constructed. | ||
|
||
trait Trait { | ||
type Type; | ||
} | ||
|
||
impl<T> Trait for T { | ||
type Type = (); | ||
} | ||
|
||
fn f<'a, 'b>(s: &'b str, _: <&'a &'b () as Trait>::Type) -> &'a str { | ||
s //~ ERROR lifetime mismatch [E0623] | ||
} | ||
|
||
fn main() { | ||
let x = String::from("Hello World!"); | ||
let y = f(&x, ()); | ||
drop(x); | ||
println!("{}", y); | ||
} |
13 changes: 13 additions & 0 deletions
13
src/test/ui/fn/implied-bounds-unnorm-associated-type.stderr
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,13 @@ | ||
error[E0623]: lifetime mismatch | ||
--> $DIR/implied-bounds-unnorm-associated-type.rs:14:5 | ||
| | ||
LL | fn f<'a, 'b>(s: &'b str, _: <&'a &'b () as Trait>::Type) -> &'a str { | ||
| ------- ---------- | ||
| | | ||
| these two types are declared with different lifetimes... | ||
LL | s | ||
| ^ ...but data from `s` flows here | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0623`. |
This file was deleted.
Oops, something went wrong.