Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0c158f0
Add a test case for #[track_caller] on async fn
eholk Oct 10, 2022
3db41d1
wip: trying to enable #[track_caller] on async fn
eholk Oct 11, 2022
8e0cac1
rustdoc: refactor `notable_traits_decl` to just act on the type directly
notriddle Nov 7, 2022
303653e
rustdoc: use javascript to layout notable traits popups
notriddle Nov 7, 2022
a45151e
rustdoc: fix font color inheritance from body, and test
notriddle Nov 8, 2022
9bcc083
run-make-fulldeps: fix split debuginfo test
davidtwco Nov 7, 2022
29dc083
llvm: dwo only emitted when object code emitted
davidtwco Nov 7, 2022
0e0bcd9
prevent uninitialized access in black_box for zero-sized-types
krasimirgg Nov 4, 2022
06a77af
Add retry flag to remote-test-server
Ayush1325 Nov 8, 2022
76cab67
Add domain size check to fix ICE
camsteffen Nov 9, 2022
bdced83
Use ObligationCtxt in expected_inputs_for_expected_outputs
compiler-errors Nov 9, 2022
07a47e0
Emit error in `collecting_trait_impl_trait_tys` on mismatched signatures
Noratrieb Nov 9, 2022
53e8b49
rustdoc: sort output to make it deterministic
notriddle Nov 9, 2022
ed6a7cc
Remove save_and_restore_in_snapshot_flag
compiler-errors Nov 9, 2022
63217e0
make dropck_outlives into a proper canonicalized type query
compiler-errors Nov 9, 2022
fa99cb8
Allow and add `track_caller` to generators
bryangarza Nov 8, 2022
509b947
Refactor nested for-loops into find() calls
bryangarza Nov 10, 2022
3074678
Mark `trait_upcasting` feature no longer incomplete.
crlf0710 Nov 7, 2022
0a7dfb2
Rollup merge of #104105 - davidtwco:split-dwarf-lto, r=michaelwoerister
Manishearth Nov 10, 2022
5272d90
Rollup merge of #104110 - krasimirgg:msan-16, r=nagisa
Manishearth Nov 10, 2022
bb4128b
Rollup merge of #104117 - crlf0710:update_feature_gate, r=jackh726
Manishearth Nov 10, 2022
e28498e
Rollup merge of #104129 - notriddle:notriddle/102576-js-notable-trait…
Manishearth Nov 10, 2022
a969253
Rollup merge of #104146 - Ayush1325:remote-test-server, r=jyn514
Manishearth Nov 10, 2022
f1d08bc
Rollup merge of #104202 - camsteffen:103748, r=estebank
Manishearth Nov 10, 2022
7a89b05
Rollup merge of #104206 - compiler-errors:ocx-more-2, r=lcnr
Manishearth Nov 10, 2022
3cc4389
Rollup merge of #104214 - Nilstrieb:returns_impl_Ice, r=compiler-errors
Manishearth Nov 10, 2022
c4561fc
Rollup merge of #104219 - bryangarza:async-track-caller-dup, r=eholk
Manishearth Nov 10, 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
Prev Previous commit
Next Next commit
Mark trait_upcasting feature no longer incomplete.
  • Loading branch information
crlf0710 committed Nov 10, 2022
commit 3074678cd1c9a2934ef11122b3744523083f1736
6 changes: 3 additions & 3 deletions compiler/rustc_feature/src/active.rs
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,9 @@ declare_features! (
(active, thread_local, "1.0.0", Some(29594), None),
/// Allows defining `trait X = A + B;` alias items.
(active, trait_alias, "1.24.0", Some(41517), None),
/// Allows upcasting trait objects via supertraits.
/// Trait upcasting is casting, e.g., `dyn Foo -> dyn Bar` where `Foo: Bar`.
(incomplete, trait_upcasting, "1.56.0", Some(65991), None),
/// Allows dyn upcasting trait objects via supertraits.
/// Dyn upcasting is casting, e.g., `dyn Foo -> dyn Bar` where `Foo: Bar`.
(active, trait_upcasting, "1.56.0", Some(65991), None),
/// Allows #[repr(transparent)] on unions (RFC 2645).
(active, transparent_unions, "1.37.0", Some(60405), None),
/// Allows inconsistent bounds in where clauses.
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/codegen/issue-99551.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// build-pass
#![feature(trait_upcasting)]
#![allow(incomplete_features)]

pub trait A {}
pub trait B {}
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/traits/trait-upcasting/basic.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// run-pass

#![feature(trait_upcasting)]
#![allow(incomplete_features)]

trait Foo: PartialEq<i32> + std::fmt::Debug + Send + Sync {
fn a(&self) -> i32 {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// run-pass
#![feature(trait_upcasting)]
#![allow(incomplete_features)]

trait Foo<T: Default + ToString>: Bar<i32> + Bar<T> {}
trait Bar<T: Default + ToString> {
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/traits/trait-upcasting/diamond.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// run-pass

#![feature(trait_upcasting)]
#![allow(incomplete_features)]

trait Foo: PartialEq<i32> + std::fmt::Debug + Send + Sync {
fn a(&self) -> i32 {
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/traits/trait-upcasting/invalid-upcast.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![feature(trait_upcasting)]
#![allow(incomplete_features)]

trait Foo {
fn a(&self) -> i32 {
Expand Down
30 changes: 15 additions & 15 deletions src/test/ui/traits/trait-upcasting/invalid-upcast.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/invalid-upcast.rs:54:35
--> $DIR/invalid-upcast.rs:53:35
|
LL | let _: &dyn std::fmt::Debug = baz;
| -------------------- ^^^ expected trait `Debug`, found trait `Baz`
Expand All @@ -10,7 +10,7 @@ LL | let _: &dyn std::fmt::Debug = baz;
found reference `&dyn Baz`

error[E0308]: mismatched types
--> $DIR/invalid-upcast.rs:56:24
--> $DIR/invalid-upcast.rs:55:24
|
LL | let _: &dyn Send = baz;
| --------- ^^^ expected trait `Send`, found trait `Baz`
Expand All @@ -21,7 +21,7 @@ LL | let _: &dyn Send = baz;
found reference `&dyn Baz`

error[E0308]: mismatched types
--> $DIR/invalid-upcast.rs:58:24
--> $DIR/invalid-upcast.rs:57:24
|
LL | let _: &dyn Sync = baz;
| --------- ^^^ expected trait `Sync`, found trait `Baz`
Expand All @@ -32,7 +32,7 @@ LL | let _: &dyn Sync = baz;
found reference `&dyn Baz`

error[E0308]: mismatched types
--> $DIR/invalid-upcast.rs:61:25
--> $DIR/invalid-upcast.rs:60:25
|
LL | let bar: &dyn Bar = baz;
| -------- ^^^ expected trait `Bar`, found trait `Baz`
Expand All @@ -43,7 +43,7 @@ LL | let bar: &dyn Bar = baz;
found reference `&dyn Baz`

error[E0308]: mismatched types
--> $DIR/invalid-upcast.rs:63:35
--> $DIR/invalid-upcast.rs:62:35
|
LL | let _: &dyn std::fmt::Debug = bar;
| -------------------- ^^^ expected trait `Debug`, found trait `Bar`
Expand All @@ -54,7 +54,7 @@ LL | let _: &dyn std::fmt::Debug = bar;
found reference `&dyn Bar`

error[E0308]: mismatched types
--> $DIR/invalid-upcast.rs:65:24
--> $DIR/invalid-upcast.rs:64:24
|
LL | let _: &dyn Send = bar;
| --------- ^^^ expected trait `Send`, found trait `Bar`
Expand All @@ -65,7 +65,7 @@ LL | let _: &dyn Send = bar;
found reference `&dyn Bar`

error[E0308]: mismatched types
--> $DIR/invalid-upcast.rs:67:24
--> $DIR/invalid-upcast.rs:66:24
|
LL | let _: &dyn Sync = bar;
| --------- ^^^ expected trait `Sync`, found trait `Bar`
Expand All @@ -76,7 +76,7 @@ LL | let _: &dyn Sync = bar;
found reference `&dyn Bar`

error[E0308]: mismatched types
--> $DIR/invalid-upcast.rs:70:25
--> $DIR/invalid-upcast.rs:69:25
|
LL | let foo: &dyn Foo = baz;
| -------- ^^^ expected trait `Foo`, found trait `Baz`
Expand All @@ -87,7 +87,7 @@ LL | let foo: &dyn Foo = baz;
found reference `&dyn Baz`

error[E0308]: mismatched types
--> $DIR/invalid-upcast.rs:72:35
--> $DIR/invalid-upcast.rs:71:35
|
LL | let _: &dyn std::fmt::Debug = foo;
| -------------------- ^^^ expected trait `Debug`, found trait `Foo`
Expand All @@ -98,7 +98,7 @@ LL | let _: &dyn std::fmt::Debug = foo;
found reference `&dyn Foo`

error[E0308]: mismatched types
--> $DIR/invalid-upcast.rs:74:24
--> $DIR/invalid-upcast.rs:73:24
|
LL | let _: &dyn Send = foo;
| --------- ^^^ expected trait `Send`, found trait `Foo`
Expand All @@ -109,7 +109,7 @@ LL | let _: &dyn Send = foo;
found reference `&dyn Foo`

error[E0308]: mismatched types
--> $DIR/invalid-upcast.rs:76:24
--> $DIR/invalid-upcast.rs:75:24
|
LL | let _: &dyn Sync = foo;
| --------- ^^^ expected trait `Sync`, found trait `Foo`
Expand All @@ -120,7 +120,7 @@ LL | let _: &dyn Sync = foo;
found reference `&dyn Foo`

error[E0308]: mismatched types
--> $DIR/invalid-upcast.rs:79:25
--> $DIR/invalid-upcast.rs:78:25
|
LL | let foo: &dyn Foo = bar;
| -------- ^^^ expected trait `Foo`, found trait `Bar`
Expand All @@ -131,7 +131,7 @@ LL | let foo: &dyn Foo = bar;
found reference `&dyn Bar`

error[E0308]: mismatched types
--> $DIR/invalid-upcast.rs:81:35
--> $DIR/invalid-upcast.rs:80:35
|
LL | let _: &dyn std::fmt::Debug = foo;
| -------------------- ^^^ expected trait `Debug`, found trait `Foo`
Expand All @@ -142,7 +142,7 @@ LL | let _: &dyn std::fmt::Debug = foo;
found reference `&dyn Foo`

error[E0308]: mismatched types
--> $DIR/invalid-upcast.rs:83:24
--> $DIR/invalid-upcast.rs:82:24
|
LL | let _: &dyn Send = foo;
| --------- ^^^ expected trait `Send`, found trait `Foo`
Expand All @@ -153,7 +153,7 @@ LL | let _: &dyn Send = foo;
found reference `&dyn Foo`

error[E0308]: mismatched types
--> $DIR/invalid-upcast.rs:85:24
--> $DIR/invalid-upcast.rs:84:24
|
LL | let _: &dyn Sync = foo;
| --------- ^^^ expected trait `Sync`, found trait `Foo`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// run-pass
#![feature(trait_upcasting)]
#![allow(incomplete_features)]

struct Test {
func: Box<dyn FnMut() + 'static>,
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/traits/trait-upcasting/lifetime.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// run-pass

#![feature(trait_upcasting)]
#![allow(incomplete_features)]

trait Foo: PartialEq<i32> + std::fmt::Debug + Send + Sync {
fn a(&self) -> i32 {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// check-fail
#![feature(trait_upcasting)]
#![allow(incomplete_features)]

trait Bar<T> {
fn bar(&self, _: T) {}
}

trait Foo : Bar<i32> + Bar<u32> {
trait Foo: Bar<i32> + Bar<u32> {
fn foo(&self, _: ()) {}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/multiple-occurrence-ambiguousity.rs:21:26
--> $DIR/multiple-occurrence-ambiguousity.rs:20:26
|
LL | let t: &dyn Bar<_> = s;
| ----------- ^ expected trait `Bar`, found trait `Foo`
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/traits/trait-upcasting/replace-vptr.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// run-pass

#![feature(trait_upcasting)]
#![allow(incomplete_features)]

trait A {
fn foo_a(&self);
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/traits/trait-upcasting/struct.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// run-pass

#![feature(trait_upcasting)]
#![allow(incomplete_features)]

use std::rc::Rc;
use std::sync::Arc;
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/traits/trait-upcasting/subtrait-method.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![feature(trait_upcasting)]
#![allow(incomplete_features)]

trait Foo: PartialEq<i32> + std::fmt::Debug + Send + Sync {
fn a(&self) -> i32 {
Expand Down
20 changes: 10 additions & 10 deletions src/test/ui/traits/trait-upcasting/subtrait-method.stderr
Original file line number Diff line number Diff line change
@@ -1,64 +1,64 @@
error[E0599]: no method named `c` found for reference `&dyn Bar` in the current scope
--> $DIR/subtrait-method.rs:56:9
--> $DIR/subtrait-method.rs:55:9
|
LL | bar.c();
| ^ help: there is a method with a similar name: `a`
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Baz` defines an item `c`, perhaps you need to implement it
--> $DIR/subtrait-method.rs:28:1
--> $DIR/subtrait-method.rs:27:1
|
LL | trait Baz: Bar {
| ^^^^^^^^^^^^^^

error[E0599]: no method named `b` found for reference `&dyn Foo` in the current scope
--> $DIR/subtrait-method.rs:60:9
--> $DIR/subtrait-method.rs:59:9
|
LL | foo.b();
| ^ help: there is a method with a similar name: `a`
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Bar` defines an item `b`, perhaps you need to implement it
--> $DIR/subtrait-method.rs:18:1
--> $DIR/subtrait-method.rs:17:1
|
LL | trait Bar: Foo {
| ^^^^^^^^^^^^^^

error[E0599]: no method named `c` found for reference `&dyn Foo` in the current scope
--> $DIR/subtrait-method.rs:62:9
--> $DIR/subtrait-method.rs:61:9
|
LL | foo.c();
| ^ help: there is a method with a similar name: `a`
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Baz` defines an item `c`, perhaps you need to implement it
--> $DIR/subtrait-method.rs:28:1
--> $DIR/subtrait-method.rs:27:1
|
LL | trait Baz: Bar {
| ^^^^^^^^^^^^^^

error[E0599]: no method named `b` found for reference `&dyn Foo` in the current scope
--> $DIR/subtrait-method.rs:66:9
--> $DIR/subtrait-method.rs:65:9
|
LL | foo.b();
| ^ help: there is a method with a similar name: `a`
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Bar` defines an item `b`, perhaps you need to implement it
--> $DIR/subtrait-method.rs:18:1
--> $DIR/subtrait-method.rs:17:1
|
LL | trait Bar: Foo {
| ^^^^^^^^^^^^^^

error[E0599]: no method named `c` found for reference `&dyn Foo` in the current scope
--> $DIR/subtrait-method.rs:68:9
--> $DIR/subtrait-method.rs:67:9
|
LL | foo.c();
| ^ help: there is a method with a similar name: `a`
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `Baz` defines an item `c`, perhaps you need to implement it
--> $DIR/subtrait-method.rs:28:1
--> $DIR/subtrait-method.rs:27:1
|
LL | trait Baz: Bar {
| ^^^^^^^^^^^^^^
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/traits/trait-upcasting/type-checking-test-1.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![feature(trait_upcasting)]
#![allow(incomplete_features)]

trait Foo: Bar<i32> + Bar<u32> {}
trait Bar<T> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0605]: non-primitive cast: `&dyn Foo` as `&dyn Bar<_>`
--> $DIR/type-checking-test-1.rs:17:13
--> $DIR/type-checking-test-1.rs:16:13
|
LL | let _ = x as &dyn Bar<_>; // Ambiguous
| ^^^^^^^^^^^^^^^^ invalid cast
Expand All @@ -10,7 +10,7 @@ LL | let _ = &x as &dyn Bar<_>; // Ambiguous
| +

error[E0277]: the trait bound `&dyn Foo: Bar<_>` is not satisfied
--> $DIR/type-checking-test-1.rs:17:13
--> $DIR/type-checking-test-1.rs:16:13
|
LL | let _ = x as &dyn Bar<_>; // Ambiguous
| ^ the trait `Bar<_>` is not implemented for `&dyn Foo`
Expand Down
1 change: 0 additions & 1 deletion src/test/ui/traits/trait-upcasting/type-checking-test-2.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![feature(trait_upcasting)]
#![allow(incomplete_features)]

trait Foo<T>: Bar<i32> + Bar<T> {}
trait Bar<T> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0605]: non-primitive cast: `&dyn Foo<i32>` as `&dyn Bar<u32>`
--> $DIR/type-checking-test-2.rs:20:13
--> $DIR/type-checking-test-2.rs:19:13
|
LL | let _ = x as &dyn Bar<u32>; // Error
| ^^^^^^^^^^^^^^^^^^ invalid cast
Expand All @@ -10,15 +10,15 @@ LL | let _ = &x as &dyn Bar<u32>; // Error
| +

error[E0277]: the trait bound `&dyn Foo<i32>: Bar<u32>` is not satisfied
--> $DIR/type-checking-test-2.rs:20:13
--> $DIR/type-checking-test-2.rs:19:13
|
LL | let _ = x as &dyn Bar<u32>; // Error
| ^ the trait `Bar<u32>` is not implemented for `&dyn Foo<i32>`
|
= note: required for the cast from `&dyn Foo<i32>` to the object type `dyn Bar<u32>`

error[E0605]: non-primitive cast: `&dyn Foo<u32>` as `&dyn Bar<_>`
--> $DIR/type-checking-test-2.rs:26:13
--> $DIR/type-checking-test-2.rs:25:13
|
LL | let a = x as &dyn Bar<_>; // Ambiguous
| ^^^^^^^^^^^^^^^^ invalid cast
Expand All @@ -29,7 +29,7 @@ LL | let a = &x as &dyn Bar<_>; // Ambiguous
| +

error[E0277]: the trait bound `&dyn Foo<u32>: Bar<_>` is not satisfied
--> $DIR/type-checking-test-2.rs:26:13
--> $DIR/type-checking-test-2.rs:25:13
|
LL | let a = x as &dyn Bar<_>; // Ambiguous
| ^ the trait `Bar<_>` is not implemented for `&dyn Foo<u32>`
Expand Down
Loading