Skip to content

Commit 07acdb4

Browse files
committed
Auto merge of rust-lang#90724 - JohnTitor:rollup-zg0kbm3, r=JohnTitor
Rollup of 6 pull requests Successful merges: - rust-lang#87530 (Add comments regarding superfluous `!Sync` impls) - rust-lang#90591 (treat illumos like solaris in failing ui tests which need it) - rust-lang#90678 (Add some GATs-related regression tests) - rust-lang#90688 (enable `dotprod` target feature in arm) - rust-lang#90708 (Add a note about feature(explicit_generic_args_with_impl_trait) to the relevant error message) - rust-lang#90720 (Update cargo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents eee8b9c + a0d580c commit 07acdb4

File tree

18 files changed

+155
-7
lines changed

18 files changed

+155
-7
lines changed

Cargo.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -888,9 +888,9 @@ dependencies = [
888888

889889
[[package]]
890890
name = "curl"
891-
version = "0.4.39"
891+
version = "0.4.40"
892892
source = "registry+https://github.com/rust-lang/crates.io-index"
893-
checksum = "aaa3b8db7f3341ddef15786d250106334d4a6c4b0ae4a46cd77082777d9849b9"
893+
checksum = "877cc2f9b8367e32b6dabb9d581557e651cb3aa693a37f8679091bbf42687d5d"
894894
dependencies = [
895895
"curl-sys",
896896
"libc",
@@ -903,9 +903,9 @@ dependencies = [
903903

904904
[[package]]
905905
name = "curl-sys"
906-
version = "0.4.49+curl-7.79.1"
906+
version = "0.4.50+curl-7.79.1"
907907
source = "registry+https://github.com/rust-lang/crates.io-index"
908-
checksum = "e0f44960aea24a786a46907b8824ebc0e66ca06bf4e4978408c7499620343483"
908+
checksum = "4856b76919dd599f31236bb18db5f5bd36e2ce131e64f857ca5c259665b76171"
909909
dependencies = [
910910
"cc",
911911
"libc",

compiler/rustc_codegen_ssa/src/target_features.rs

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const ARM_ALLOWED_FEATURES: &[(&str, Option<Symbol>)] = &[
2020
("aes", Some(sym::arm_target_feature)),
2121
("sha2", Some(sym::arm_target_feature)),
2222
("i8mm", Some(sym::arm_target_feature)),
23+
("dotprod", Some(sym::arm_target_feature)),
2324
("v5te", Some(sym::arm_target_feature)),
2425
("v6", Some(sym::arm_target_feature)),
2526
("v6k", Some(sym::arm_target_feature)),

compiler/rustc_typeck/src/astconv/generics.rs

+11
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,17 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
672672
err.span_label(span, "explicit generic argument not allowed");
673673
}
674674

675+
err.note(
676+
"see issue #83701 <https://github.com/rust-lang/rust/issues/83701> \
677+
for more information",
678+
);
679+
if tcx.sess.is_nightly_build() {
680+
err.help(
681+
"add `#![feature(explicit_generic_args_with_impl_trait)]` \
682+
to the crate attributes to enable",
683+
);
684+
}
685+
675686
err.emit();
676687
}
677688

library/alloc/src/rc.rs

+6
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,12 @@ pub struct Rc<T: ?Sized> {
313313

314314
#[stable(feature = "rust1", since = "1.0.0")]
315315
impl<T: ?Sized> !marker::Send for Rc<T> {}
316+
317+
// Note that this negative impl isn't strictly necessary for correctness,
318+
// as `Rc` transitively contains a `Cell`, which is itself `!Sync`.
319+
// However, given how important `Rc`'s `!Sync`-ness is,
320+
// having an explicit negative impl is nice for documentation purposes
321+
// and results in nicer error messages.
316322
#[stable(feature = "rust1", since = "1.0.0")]
317323
impl<T: ?Sized> !marker::Sync for Rc<T> {}
318324

library/core/src/cell.rs

+5
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,11 @@ pub struct Cell<T: ?Sized> {
240240
#[stable(feature = "rust1", since = "1.0.0")]
241241
unsafe impl<T: ?Sized> Send for Cell<T> where T: Send {}
242242

243+
// Note that this negative impl isn't strictly necessary for correctness,
244+
// as `Cell` wraps `UnsafeCell`, which is itself `!Sync`.
245+
// However, given how important `Cell`'s `!Sync`-ness is,
246+
// having an explicit negative impl is nice for documentation purposes
247+
// and results in nicer error messages.
243248
#[stable(feature = "rust1", since = "1.0.0")]
244249
impl<T: ?Sized> !Sync for Cell<T> {}
245250

src/test/ui/const-generics/impl-trait-with-const-arguments.stderr

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ error[E0632]: cannot provide explicit generic arguments when `impl Trait` is use
33
|
44
LL | assert_eq!(f::<4usize>(Usizable), 20usize);
55
| ^^^^^^ explicit generic argument not allowed
6+
|
7+
= note: see issue #83701 <https://github.com/rust-lang/rust/issues/83701> for more information
8+
= help: add `#![feature(explicit_generic_args_with_impl_trait)]` to the crate attributes to enable
69

710
error: aborting due to previous error
811

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#![feature(generic_associated_types)]
2+
#![feature(type_alias_impl_trait)]
3+
4+
fn main() {}
5+
6+
trait A<'a> {
7+
type B<'b>: Clone
8+
// FIXME(generic_associated_types): Remove one of the below bounds
9+
// https://github.com/rust-lang/rust/pull/90678#discussion_r744976085
10+
where
11+
'a: 'b, Self: 'a, Self: 'b;
12+
13+
fn a(&'a self) -> Self::B<'a>;
14+
}
15+
16+
struct C;
17+
18+
impl<'a> A<'a> for C {
19+
type B<'b> = impl Clone;
20+
//~^ ERROR: lifetime bound not satisfied
21+
//~| ERROR: could not find defining uses
22+
23+
fn a(&'a self) -> Self::B<'a> {} //~ ERROR: non-defining opaque type use in defining scope
24+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
error[E0478]: lifetime bound not satisfied
2+
--> $DIR/issue-88595.rs:19:5
3+
|
4+
LL | type B<'b> = impl Clone;
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
note: lifetime parameter instantiated with the lifetime `'a` as defined here
8+
--> $DIR/issue-88595.rs:18:6
9+
|
10+
LL | impl<'a> A<'a> for C {
11+
| ^^
12+
note: but lifetime parameter must outlive the lifetime `'b` as defined here
13+
--> $DIR/issue-88595.rs:19:12
14+
|
15+
LL | type B<'b> = impl Clone;
16+
| ^^
17+
18+
error: non-defining opaque type use in defining scope
19+
--> $DIR/issue-88595.rs:23:23
20+
|
21+
LL | fn a(&'a self) -> Self::B<'a> {}
22+
| ^^^^^^^^^^^
23+
|
24+
note: lifetime used multiple times
25+
--> $DIR/issue-88595.rs:18:6
26+
|
27+
LL | impl<'a> A<'a> for C {
28+
| ^^
29+
LL | type B<'b> = impl Clone;
30+
| ^^
31+
32+
error: could not find defining uses
33+
--> $DIR/issue-88595.rs:19:18
34+
|
35+
LL | type B<'b> = impl Clone;
36+
| ^^^^^^^^^^
37+
38+
error: aborting due to 3 previous errors
39+
40+
For more information about this error, try `rustc --explain E0478`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// edition:2018
2+
3+
#![feature(generic_associated_types)]
4+
#![feature(type_alias_impl_trait)]
5+
6+
use std::future::Future;
7+
8+
trait MakeFut {
9+
type Fut<'a> where Self: 'a;
10+
fn make_fut<'a>(&'a self) -> Self::Fut<'a>;
11+
}
12+
13+
impl MakeFut for &'_ mut () {
14+
type Fut<'a> = impl Future<Output = ()>;
15+
//~^ ERROR: the type `&mut ()` does not fulfill the required lifetime
16+
17+
fn make_fut<'a>(&'a self) -> Self::Fut<'a> {
18+
async { () }
19+
}
20+
}
21+
22+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
error[E0477]: the type `&mut ()` does not fulfill the required lifetime
2+
--> $DIR/issue-90014.rs:14:5
3+
|
4+
LL | type Fut<'a> = impl Future<Output = ()>;
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
note: type must outlive the lifetime `'a` as defined here
8+
--> $DIR/issue-90014.rs:14:14
9+
|
10+
LL | type Fut<'a> = impl Future<Output = ()>;
11+
| ^^
12+
13+
error: aborting due to previous error
14+
15+
For more information about this error, try `rustc --explain E0477`.

src/test/ui/impl-trait/explicit-generic-args-with-impl-trait/feature-gate.stderr

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ error[E0632]: cannot provide explicit generic arguments when `impl Trait` is use
33
|
44
LL | foo::<str>("".to_string());
55
| ^^^ explicit generic argument not allowed
6+
|
7+
= note: see issue #83701 <https://github.com/rust-lang/rust/issues/83701> for more information
8+
= help: add `#![feature(explicit_generic_args_with_impl_trait)]` to the crate attributes to enable
69

710
error: aborting due to previous error
811

src/test/ui/impl-trait/issues/universal-issue-48703.stderr

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ error[E0632]: cannot provide explicit generic arguments when `impl Trait` is use
33
|
44
LL | foo::<String>('a');
55
| ^^^^^^ explicit generic argument not allowed
6+
|
7+
= note: see issue #83701 <https://github.com/rust-lang/rust/issues/83701> for more information
8+
= help: add `#![feature(explicit_generic_args_with_impl_trait)]` to the crate attributes to enable
69

710
error: aborting due to previous error
811

src/test/ui/impl-trait/issues/universal-turbofish-in-method-issue-50950.stderr

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ LL | evt.handle_event::<TestEvent, fn(TestEvent)>(|_evt| {
55
| ^^^^^^^^^ ^^^^^^^^^^^^^ explicit generic argument not allowed
66
| |
77
| explicit generic argument not allowed
8+
|
9+
= note: see issue #83701 <https://github.com/rust-lang/rust/issues/83701> for more information
10+
= help: add `#![feature(explicit_generic_args_with_impl_trait)]` to the crate attributes to enable
811

912
error: aborting due to previous error
1013

src/test/ui/intrinsics/intrinsic-alignment.rs

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ mod rusti {
1515
target_os = "emscripten",
1616
target_os = "freebsd",
1717
target_os = "fuchsia",
18+
target_os = "illumos",
1819
target_os = "linux",
1920
target_os = "macos",
2021
target_os = "netbsd",

src/test/ui/structs-enums/rec-align-u64.rs

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ struct Outer {
3636
target_os = "emscripten",
3737
target_os = "freebsd",
3838
target_os = "fuchsia",
39+
target_os = "illumos",
3940
target_os = "linux",
4041
target_os = "macos",
4142
target_os = "netbsd",

src/test/ui/synthetic-param.stderr

+9
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,27 @@ error[E0632]: cannot provide explicit generic arguments when `impl Trait` is use
33
|
44
LL | func::<u8>(42);
55
| ^^ explicit generic argument not allowed
6+
|
7+
= note: see issue #83701 <https://github.com/rust-lang/rust/issues/83701> for more information
8+
= help: add `#![feature(explicit_generic_args_with_impl_trait)]` to the crate attributes to enable
69

710
error[E0632]: cannot provide explicit generic arguments when `impl Trait` is used in argument position
811
--> $DIR/synthetic-param.rs:23:17
912
|
1013
LL | Foo::func::<u8>(42);
1114
| ^^ explicit generic argument not allowed
15+
|
16+
= note: see issue #83701 <https://github.com/rust-lang/rust/issues/83701> for more information
17+
= help: add `#![feature(explicit_generic_args_with_impl_trait)]` to the crate attributes to enable
1218

1319
error[E0632]: cannot provide explicit generic arguments when `impl Trait` is used in argument position
1420
--> $DIR/synthetic-param.rs:26:23
1521
|
1622
LL | Bar::<i8>::func::<u8>(42);
1723
| ^^ explicit generic argument not allowed
24+
|
25+
= note: see issue #83701 <https://github.com/rust-lang/rust/issues/83701> for more information
26+
= help: add `#![feature(explicit_generic_args_with_impl_trait)]` to the crate attributes to enable
1827

1928
error: aborting due to 3 previous errors
2029

src/test/ui/x86stdcall.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ pub fn main() {
2828
target_os = "emscripten",
2929
target_os = "freebsd",
3030
target_os = "fuchsia",
31+
target_os = "illumos",
3132
target_os = "linux",
3233
target_os = "macos",
3334
target_os = "netbsd",
3435
target_os = "openbsd",
35-
target_os = "vxworks",
36-
target_os = "solaris"))]
36+
target_os = "solaris",
37+
target_os = "vxworks"))]
3738
pub fn main() { }

0 commit comments

Comments
 (0)