forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#98269 - compiler-errors:provide-more-segmen…
…t-res, r=petrochenkov Provide a `PathSegment.res` in more cases I find that in many cases, the `res` associated with a `PathSegment` is `Res::Err` even though the path was fully resolved. A few diagnostics use this `res` and their error messages suffer because of the lack of resolved segment. This fixes it a bit, but it's obviously not complete and I'm not exactly sure if it's correct.
- Loading branch information
Showing
14 changed files
with
116 additions
and
115 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
// run-rustfix | ||
fn main() { | ||
|
||
let _x: isize; //~ ERROR type arguments are not allowed on this type | ||
let _x: i8; //~ ERROR type arguments are not allowed on this type | ||
let _x: i16; //~ ERROR type arguments are not allowed on this type | ||
let _x: i32; //~ ERROR type arguments are not allowed on this type | ||
let _x: i64; //~ ERROR type arguments are not allowed on this type | ||
let _x: usize; //~ ERROR type arguments are not allowed on this type | ||
let _x: u8; //~ ERROR type arguments are not allowed on this type | ||
let _x: u16; //~ ERROR type arguments are not allowed on this type | ||
let _x: u32; //~ ERROR type arguments are not allowed on this type | ||
let _x: u64; //~ ERROR type arguments are not allowed on this type | ||
let _x: char; //~ ERROR type arguments are not allowed on this type | ||
let _x: isize; //~ ERROR type arguments are not allowed on builtin type | ||
let _x: i8; //~ ERROR type arguments are not allowed on builtin type | ||
let _x: i16; //~ ERROR type arguments are not allowed on builtin type | ||
let _x: i32; //~ ERROR type arguments are not allowed on builtin type | ||
let _x: i64; //~ ERROR type arguments are not allowed on builtin type | ||
let _x: usize; //~ ERROR type arguments are not allowed on builtin type | ||
let _x: u8; //~ ERROR type arguments are not allowed on builtin type | ||
let _x: u16; //~ ERROR type arguments are not allowed on builtin type | ||
let _x: u32; //~ ERROR type arguments are not allowed on builtin type | ||
let _x: u64; //~ ERROR type arguments are not allowed on builtin type | ||
let _x: char; //~ ERROR type arguments are not allowed on builtin type | ||
|
||
let _x: isize; //~ ERROR lifetime arguments are not allowed on this type | ||
let _x: i8; //~ ERROR lifetime arguments are not allowed on this type | ||
let _x: i16; //~ ERROR lifetime arguments are not allowed on this type | ||
let _x: i32; //~ ERROR lifetime arguments are not allowed on this type | ||
let _x: i64; //~ ERROR lifetime arguments are not allowed on this type | ||
let _x: usize; //~ ERROR lifetime arguments are not allowed on this type | ||
let _x: u8; //~ ERROR lifetime arguments are not allowed on this type | ||
let _x: u16; //~ ERROR lifetime arguments are not allowed on this type | ||
let _x: u32; //~ ERROR lifetime arguments are not allowed on this type | ||
let _x: u64; //~ ERROR lifetime arguments are not allowed on this type | ||
let _x: char; //~ ERROR lifetime arguments are not allowed on this type | ||
let _x: isize; //~ ERROR lifetime arguments are not allowed on builtin type | ||
let _x: i8; //~ ERROR lifetime arguments are not allowed on builtin type | ||
let _x: i16; //~ ERROR lifetime arguments are not allowed on builtin type | ||
let _x: i32; //~ ERROR lifetime arguments are not allowed on builtin type | ||
let _x: i64; //~ ERROR lifetime arguments are not allowed on builtin type | ||
let _x: usize; //~ ERROR lifetime arguments are not allowed on builtin type | ||
let _x: u8; //~ ERROR lifetime arguments are not allowed on builtin type | ||
let _x: u16; //~ ERROR lifetime arguments are not allowed on builtin type | ||
let _x: u32; //~ ERROR lifetime arguments are not allowed on builtin type | ||
let _x: u64; //~ ERROR lifetime arguments are not allowed on builtin type | ||
let _x: char; //~ ERROR lifetime arguments are not allowed on builtin type | ||
|
||
} |
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,28 +1,28 @@ | ||
// run-rustfix | ||
fn main() { | ||
|
||
let _x: isize<isize>; //~ ERROR type arguments are not allowed on this type | ||
let _x: i8<isize>; //~ ERROR type arguments are not allowed on this type | ||
let _x: i16<isize>; //~ ERROR type arguments are not allowed on this type | ||
let _x: i32<isize>; //~ ERROR type arguments are not allowed on this type | ||
let _x: i64<isize>; //~ ERROR type arguments are not allowed on this type | ||
let _x: usize<isize>; //~ ERROR type arguments are not allowed on this type | ||
let _x: u8<isize>; //~ ERROR type arguments are not allowed on this type | ||
let _x: u16<isize>; //~ ERROR type arguments are not allowed on this type | ||
let _x: u32<isize>; //~ ERROR type arguments are not allowed on this type | ||
let _x: u64<isize>; //~ ERROR type arguments are not allowed on this type | ||
let _x: char<isize>; //~ ERROR type arguments are not allowed on this type | ||
let _x: isize<isize>; //~ ERROR type arguments are not allowed on builtin type | ||
let _x: i8<isize>; //~ ERROR type arguments are not allowed on builtin type | ||
let _x: i16<isize>; //~ ERROR type arguments are not allowed on builtin type | ||
let _x: i32<isize>; //~ ERROR type arguments are not allowed on builtin type | ||
let _x: i64<isize>; //~ ERROR type arguments are not allowed on builtin type | ||
let _x: usize<isize>; //~ ERROR type arguments are not allowed on builtin type | ||
let _x: u8<isize>; //~ ERROR type arguments are not allowed on builtin type | ||
let _x: u16<isize>; //~ ERROR type arguments are not allowed on builtin type | ||
let _x: u32<isize>; //~ ERROR type arguments are not allowed on builtin type | ||
let _x: u64<isize>; //~ ERROR type arguments are not allowed on builtin type | ||
let _x: char<isize>; //~ ERROR type arguments are not allowed on builtin type | ||
|
||
let _x: isize<'static>; //~ ERROR lifetime arguments are not allowed on this type | ||
let _x: i8<'static>; //~ ERROR lifetime arguments are not allowed on this type | ||
let _x: i16<'static>; //~ ERROR lifetime arguments are not allowed on this type | ||
let _x: i32<'static>; //~ ERROR lifetime arguments are not allowed on this type | ||
let _x: i64<'static>; //~ ERROR lifetime arguments are not allowed on this type | ||
let _x: usize<'static>; //~ ERROR lifetime arguments are not allowed on this type | ||
let _x: u8<'static>; //~ ERROR lifetime arguments are not allowed on this type | ||
let _x: u16<'static>; //~ ERROR lifetime arguments are not allowed on this type | ||
let _x: u32<'static>; //~ ERROR lifetime arguments are not allowed on this type | ||
let _x: u64<'static>; //~ ERROR lifetime arguments are not allowed on this type | ||
let _x: char<'static>; //~ ERROR lifetime arguments are not allowed on this type | ||
let _x: isize<'static>; //~ ERROR lifetime arguments are not allowed on builtin type | ||
let _x: i8<'static>; //~ ERROR lifetime arguments are not allowed on builtin type | ||
let _x: i16<'static>; //~ ERROR lifetime arguments are not allowed on builtin type | ||
let _x: i32<'static>; //~ ERROR lifetime arguments are not allowed on builtin type | ||
let _x: i64<'static>; //~ ERROR lifetime arguments are not allowed on builtin type | ||
let _x: usize<'static>; //~ ERROR lifetime arguments are not allowed on builtin type | ||
let _x: u8<'static>; //~ ERROR lifetime arguments are not allowed on builtin type | ||
let _x: u16<'static>; //~ ERROR lifetime arguments are not allowed on builtin type | ||
let _x: u32<'static>; //~ ERROR lifetime arguments are not allowed on builtin type | ||
let _x: u64<'static>; //~ ERROR lifetime arguments are not allowed on builtin type | ||
let _x: char<'static>; //~ ERROR lifetime arguments are not allowed on builtin type | ||
|
||
} |
Oops, something went wrong.