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

Lines changed: 4 additions & 4 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 11 additions & 0 deletions
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

Lines changed: 6 additions & 0 deletions
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

Lines changed: 5 additions & 0 deletions
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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 24 additions & 0 deletions
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+
}
Lines changed: 40 additions & 0 deletions
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`.
Lines changed: 22 additions & 0 deletions
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() {}
Lines changed: 15 additions & 0 deletions
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`.

0 commit comments

Comments
 (0)