8000 Rollup of 16 pull requests by compiler-errors · Pull Request #98438 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Rollup of 16 pull requests #98438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 40 commits into from
Jun 24, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
95dc353
Fix documentation for with_capacity and reserve families of methods
jmaargh Apr 9, 2022
1deca04
Greatly improve error reporting for futures and generators in `note_o…
jyn514 Jun 19, 2022
1e7ab0b
point at private fields in struct literal
TaKO8Ki Jun 20, 2022
f001795
don't alloc error string if no error emitted
klensy Jun 20, 2022
b37a05b
rustdoc: optimize loading of source sidebar
jsha Jun 20, 2022
e900a35
Give name if anonymous region appears in impl signature
compiler-errors Jun 21, 2022
f924e74
Provide a segment res in more cases
compiler-errors Jun 20, 2022
761c846
Add `create_err` and `emit_err` to `ExtCtxt`
beetrees Jun 21, 2022
d6072e5
Add UI test for `cfg!(foo, bar)`
beetrees Jun 21, 2022
6264ffb
Migrate `builtin-macros-requires-cfg-pattern` to `SessionDiagnostic`
beetrees Jun 21, 2022
be5337c
Migrate `builtin-macros-expected-one-cfg-pattern` to `SessionDiagnostic`
beetrees Jun 21, 2022
8e09f42
Update Emscripten's no_default_libraries handling
hoodmane Jun 21, 2022
b052d76
Address review comments from #98259
jyn514 Jun 22, 2022
f847261
stop pointing at definitions of missing fields
TaKO8Ki Jun 22, 2022
46b2454
clarify Arc::clone overflow check comment
RalfJung Jun 22, 2022
eb86daa
add "was" to pluralize macro and use it
TaKO8Ki Jun 22, 2022
53481a5
implement `iter_projections` function on `PlaceRef`
rosefromthedead Jun 22, 2022
8e40d93
Filter out keyword items in rustdoc JSON output
GuillaumeGomez Jun 22, 2022
75ad2f7
Add test for keywords in rustdoc JSON output
GuillaumeGomez Jun 22, 2022
96cc0c6
triagebot.toml: Allow applying nominated labels
joshtriplett Jun 22, 2022
5cf5a52
triagebot.toml: Sort and wrap the list of allowed labels
joshtriplett Jun 22, 2022
24e0c44
Update books
ehuss Jun 22, 2022
b96ae9b
Set no_default_libraries: false in wasm32_emscripten target
hoodmane Jun 23, 2022
137d3c7
Update browser-ui-test version to 0.9.6
GuillaumeGomez Jun 23, 2022
262382f
Rollup merge of #96173 - jmaargh:jmaargh/with-capacity-doc-fix, r=Dyl…
compiler-errors Jun 23, 2022
49bcc70
Rollup merge of #98184 - compiler-errors:elided-lifetime-in-impl-nll,…
compiler-errors Jun 23, 2022
413e350
Rollup merge of #98259 - jyn514:improve-obligation-errors, r=estebank
compiler-errors Jun 23, 2022
3b68700
Rollup merge of #98269 - compiler-errors:provide-more-segment-res, r=…
compiler-errors Jun 23, 2022
41cb5e9
Rollup merge of #98283 - TaKO8Ki:point-at-private-fields-in-struct-li…
compiler-errors Jun 23, 2022
0ed2fec
Rollup merge of #98305 - klensy:no-err-alloc, r=compiler-errors
compiler-errors Jun 23, 2022
cc95225
Rollup merge of #98310 - jsha:defer-source-sidebar, r=GuillaumeGomez
compiler-errors Jun 23, 2022
21085e9
Rollup merge of #98353 - beetrees:builtin-macros-cfg-diag, r=davidtwco
compiler-errors Jun 23, 2022
cc45ad5
Rollup merge of #98355 - hoodmane:emscripten-no-default, r=petrochenkov
compiler-errors Jun 23, 2022
e749ba2
Rollup merge of #98364 - RalfJung:arc-clone, r=Mark-Simulacrum
compiler-errors Jun 23, 2022
667a546
Rollup merge of #98365 - jyn514:improve-obligation-errors-review-comm…
compiler-errors Jun 23, 2022
aafddd2
Rollup merge of #98388 - rosehuds:master, r=davidtwco
compiler-errors Jun 23, 2022
5620983
Rollup merge of #98390 - GuillaumeGomez:keyword-rustdoc-json, r=notri…
compiler-errors Jun 23, 2022
8db945f
Rollup merge of #98409 - joshtriplett:triagebot-nominated, r=Mark-Sim…
compiler-errors Jun 23, 2022
28b92ba
Rollup merge of #98410 - ehuss:update-books, r=ehuss
compiler-errors Jun 23, 2022
c9b1674
Rollup merge of #98422 - GuillaumeGomez:browser-ui-test-update, r=Dyl…
compiler-errors Jun 23, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions compiler/rustc_resolve/src/ident.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1502,6 +1502,7 @@ impl<'a> Resolver<'a> {
return PathResult::NonModule(PartialRes::new(Res::Err));
} else if opt_ns.is_some() && (is_last || maybe_assoc) {
self.lint_if_path_starts_with_module(finalize, path, second_binding);
record_segment_res(self, res);
return PathResult::NonModule(PartialRes::with_unresolved_segments(
res,
path.len() - i - 1,
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/error-codes/E0109.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
error[E0109]: type arguments are not allowed on this type
error[E0109]: type arguments are not allowed on builtin type `u32`
--> $DIR/E0109.rs:1:14
|
LL | type X = u32<i32>;
| --- ^^^ type argument not allowed
| |
| not allowed on this type
| not allowed on builtin type `u32`
|
help: primitive type `u32` doesn't have generic parameters
|
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/error-codes/E0110.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
error[E0109]: lifetime arguments are not allowed on this type
error[E0109]: lifetime arguments are not allowed on builtin type `u32`
--> $DIR/E0110.rs:1:14
|
LL | type X = u32<'static>;
| --- ^^^^^^^ lifetime argument not allowed
| |
| not allowed on this type
| not allowed on builtin type `u32`
|
help: primitive type `u32` doesn't have generic parameters
|
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/inference/cannot-infer-closure-circular.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ fn main() {
// error handles this gracefully, and in particular doesn't generate an extra
// note about the `?` operator in the closure body, which isn't relevant to
// the inference.
let x = |r| {
let x = |r| { //~ ERROR type annotations needed for `Result<(), E>`
let v = r?;
Ok(v)
};

let _ = x(x(Ok(()))); //~ ERROR type annotations needed for `Result<(), E>`
let _ = x(x(Ok(())));
}
12 changes: 6 additions & 6 deletions src/test/ui/inference/cannot-infer-closure-circular.stderr
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
error[E0282]: type annotations needed for `Result<(), E>`
--> $DIR/cannot-infer-closure-circular.rs:12:9
--> $DIR/cannot-infer-closure-circular.rs:7:14
|
LL | let _ = x(x(Ok(())));
| ^
LL | let x = |r| {
| ^
|
help: consider giving this pattern a type, where the type for type parameter `E` is specified
help: consider giving this closure parameter an explicit type, where the type for type parameter `E` is specified
|
LL | let _: Result<(), E> = x(x(Ok(())));
| +++++++++++++++
LL | let x = |r: Result<(), E>| {
| +++++++++++++++

error: aborting due to previous error

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ fn main() {
// Tuple struct variant

Enum::<()>::TSVariant::<()>(());
//~^ ERROR type arguments are not allowed on this type [E0109]
//~^ ERROR type arguments are not allowed on tuple variant `TSVariant` [E0109]

Alias::TSVariant::<()>(());
//~^ ERROR type arguments are not allowed on this type [E0109]
Expand All @@ -70,7 +70,7 @@ fn main() {
// Struct variant

Enum::<()>::SVariant::<()> { v: () };
//~^ ERROR type arguments are not allowed on this type [E0109]
//~^ ERROR type arguments are not allowed on variant `SVariant` [E0109]

Alias::SVariant::<()> { v: () };
//~^ ERROR type arguments are not allowed on this type [E0109]
Expand All @@ -88,7 +88,7 @@ fn main() {
// Unit variant

Enum::<()>::UVariant::<()>;
//~^ ERROR type arguments are not allowed on this type [E0109]
//~^ ERROR type arguments are not allowed on unit variant `UVariant` [E0109]

Alias::UVariant::<()>;
//~^ ERROR type arguments are not allowed on this type [E0109]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,13 +272,13 @@ LL | Self::<()>::UVariant::<()>;
| |
| not allowed on this type

error[E0109]: type arguments are not allowed on this type
error[E0109]: type arguments are not allowed on tuple variant `TSVariant`
--> $DIR/enum-variant-generic-args.rs:54:29
|
LL | Enum::<()>::TSVariant::<()>(());
| --------- ^^ type argument not allowed
| |
| not allowed on this type
| not allowed on tuple variant `TSVariant`

error[E0109]: type arguments are not allowed on this type
--> $DIR/enum-variant-generic-args.rs:57:24
Expand Down Expand Up @@ -340,13 +340,13 @@ LL | AliasFixed::<()>::TSVariant::<()>(());
| |
| not allowed on this type

error[E0109]: type arguments are not allowed on this type
error[E0109]: type arguments are not allowed on variant `SVariant`
--> $DIR/enum-variant-generic-args.rs:72:28
|
LL | Enum::<()>::SVariant::<()> { v: () };
| -------- ^^ type argument not allowed
| |
| not allowed on this type
| not allowed on variant `SVariant`
|
= note: enum variants can't have type parameters

Expand Down Expand Up @@ -438,13 +438,13 @@ LL - AliasFixed::<()>::SVariant::<()> { v: () };
LL + AliasFixed::<()>::SVariant { v: () };
|

error[E0109]: type arguments are not allowed on this type
error[E0109]: type arguments are not allowed on unit variant `UVariant`
--> $DIR/enum-variant-generic-args.rs:90:28
|
LL | Enum::<()>::UVariant::<()>;
| -------- ^^ type argument not allowed
| |
| not allowed on this type
| not allowed on unit variant `UVariant`

error[E0109]: type arguments are not allowed on this type
--> $DIR/enum-variant-generic-args.rs:93:23
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/type/issue-91268.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// error-pattern: this file contains an unclosed delimiter
// error-pattern: cannot find type `ţ` in this scope
// error-pattern: parenthesized type parameters may only be used with a `Fn` trait
// error-pattern: type arguments are not allowed on this type
// error-pattern: type arguments are not allowed on builtin type `u8`
// error-pattern: mismatched types
// ignore-tidy-trailing-newlines
// `ţ` must be the last character in this file, it cannot be followed by a newline
Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/type/issue-91268.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ help: use angle brackets instead
LL | 0: u8<ţ>
| ~ +

error[E0109]: type arguments are not allowed on this type
error[E0109]: type arguments are not allowed on builtin type `u8`
--> $DIR/issue-91268.rs:9:11
|
LL | 0: u8(ţ
| -- ^ type argument not allowed
| |
| not allowed on this type
| not allowed on builtin type `u8`
|
help: primitive type `u8` doesn't have generic parameters
|
Expand Down
44 changes: 22 additions & 22 deletions src/test/ui/typeck/prim-with-args.fixed
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

}
44 changes: 22 additions & 22 deletions src/test/ui/typeck/prim-with-args.rs
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

}
Loading
0