-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 #98752 - matthiaskrgr:rollup-uwimznc, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - #98610 (fix `emit_inference_failure_err` ICE) - #98640 (Let rust-analyzer ship on stable, non-preview) - #98686 (add ice test for 46511) - #98727 (rustdoc: filter '_ lifetimes from ty::PolyTraitRef) - #98729 (clarify that ExactSizeIterator::len returns the remaining length) - #98733 (Request to be notified of MIR changes) - #98734 (Update RELEASES.md) - #98745 (Add a `--build-dir` flag to rustbuild) - #98749 (Add macro_rules! rustdoc change to 1.62 relnotes) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
23 changed files
with
200 additions
and
25 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
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
9 changes: 9 additions & 0 deletions
9
src/test/rustdoc/auxiliary/issue-98697-reexport-with-anonymous-lifetime.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,9 @@ | ||
/// When reexporting this function, make sure the anonymous lifetimes are not rendered. | ||
/// | ||
/// https://github.com/rust-lang/rust/issues/98697 | ||
pub fn repro<F>() | ||
where | ||
F: Fn(&str), | ||
{ | ||
unimplemented!() | ||
} |
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 @@ | ||
// aux-build:issue-98697-reexport-with-anonymous-lifetime.rs | ||
// ignore-cross-compile | ||
|
||
// When reexporting a function with a HRTB with anonymous lifetimes, | ||
// make sure the anonymous lifetimes are not rendered. | ||
// | ||
// https://github.com/rust-lang/rust/issues/98697 | ||
|
||
extern crate issue_98697_reexport_with_anonymous_lifetime; | ||
|
||
// @has issue_98697/fn.repro.html '//pre[@class="rust fn"]/code' 'fn repro<F>() where F: Fn(&str)' | ||
// @!has issue_98697/fn.repro.html '//pre[@class="rust fn"]/code' 'for<' | ||
pub use issue_98697_reexport_with_anonymous_lifetime::repro; |
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,8 @@ | ||
// check-fail | ||
|
||
struct Foo<'a> //~ ERROR parameter `'a` is never used [E0392] | ||
{ | ||
_a: [u8; std::mem::size_of::<&'a mut u8>()] //~ ERROR a non-static lifetime is not allowed in a `const` | ||
} | ||
|
||
pub fn main() {} |
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,21 @@ | ||
error[E0658]: a non-static lifetime is not allowed in a `const` | ||
--> $DIR/issue-46511.rs:5:35 | ||
| | ||
LL | _a: [u8; std::mem::size_of::<&'a mut u8>()] | ||
| ^^ | ||
| | ||
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information | ||
= help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable | ||
|
||
error[E0392]: parameter `'a` is never used | ||
--> $DIR/issue-46511.rs:3:12 | ||
| | ||
LL | struct Foo<'a> | ||
| ^^ unused parameter | ||
| | ||
= help: consider removing `'a`, referring to it in a field, or using a marker such as `PhantomData` | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
Some errors have detailed explanations: E0392, E0658. | ||
For more information about an error, try `rustc --explain E0392`. |
21 changes: 21 additions & 0 deletions
21
src/test/ui/inference/need_type_info/expr-struct-type-relative-enum.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,21 @@ | ||
trait Foo { | ||
type Output; | ||
|
||
fn baz() -> Self::Output; | ||
} | ||
|
||
fn needs_infer<T>() {} | ||
|
||
enum Bar { | ||
Variant {} | ||
} | ||
|
||
impl Foo for u8 { | ||
type Output = Bar; | ||
fn baz() -> Self::Output { | ||
needs_infer(); //~ ERROR type annotations needed | ||
Self::Output::Variant {} | ||
} | ||
} | ||
|
||
fn main() {} |
14 changes: 14 additions & 0 deletions
14
src/test/ui/inference/need_type_info/expr-struct-type-relative-enum.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[E0282]: type annotations needed | ||
--> $DIR/expr-struct-type-relative-enum.rs:16:9 | ||
| | ||
LL | needs_infer(); | ||
| ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `needs_infer` | ||
| | ||
help: consider specifying the generic argument | ||
| | ||
LL | needs_infer::<T>(); | ||
| +++++ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0282`. |
21 changes: 21 additions & 0 deletions
21
src/test/ui/inference/need_type_info/expr-struct-type-relative-gat.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,21 @@ | ||
#![feature(generic_associated_types)] | ||
|
||
trait Foo { | ||
type Output<T>; | ||
|
||
fn baz(); | ||
} | ||
|
||
enum Bar<T> { | ||
Simple {}, | ||
Generic(T), | ||
} | ||
|
||
impl Foo for u8 { | ||
type Output<T> = Bar<T>; | ||
fn baz() { | ||
Self::Output::Simple {}; //~ ERROR type annotations needed | ||
} | ||
} | ||
|
||
fn main() {} |
9 changes: 9 additions & 0 deletions
9
src/test/ui/inference/need_type_info/expr-struct-type-relative-gat.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,9 @@ | ||
error[E0282]: type annotations needed | ||
--> $DIR/expr-struct-type-relative-gat.rs:17:9 | ||
| | ||
LL | Self::Output::Simple {}; | ||
| ^^^^^^^^^^^^ cannot infer type for type parameter `T` declared on the associated type `Output` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0282`. |
21 changes: 21 additions & 0 deletions
21
src/test/ui/inference/need_type_info/expr-struct-type-relative.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,21 @@ | ||
// regression test for #98598 | ||
|
||
trait Foo { | ||
type Output; | ||
|
||
fn baz() -> Self::Output; | ||
} | ||
|
||
fn needs_infer<T>() {} | ||
|
||
struct Bar {} | ||
|
||
impl Foo for u8 { | ||
type Output = Bar; | ||
fn baz() -> Self::Output { | ||
needs_infer(); //~ ERROR type annotations needed | ||
Self::Output {} | ||
} | ||
} | ||
|
||
fn main() {} |
14 changes: 14 additions & 0 deletions
14
src/test/ui/inference/need_type_info/expr-struct-type-relative.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[E0282]: type annotations needed | ||
--> $DIR/expr-struct-type-relative.rs:16:9 | ||
| | ||
LL | needs_infer(); | ||
| ^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `needs_infer` | ||
| | ||
help: consider specifying the generic argument | ||
| | ||
LL | needs_infer::<T>(); | ||
| +++++ | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0282`. |
Oops, something went wrong.