Skip to content
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

Inconsistency with “at least one non-builtin trait is required for an object type” #37515

Closed
bluss opened this issue Nov 1, 2016 · 1 comment
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.

Comments

@bluss
Copy link
Member

bluss commented Nov 1, 2016

Auto traits are alone allowed as object types in some cases and not others.

The following two lines are fine: (Using Send as an object type)

type Y = Send;

fn main() {
    let x = &1 as &Send;
}

The following line has an error:

type Z = for<'x> Send;  //~ error[E0224]: at least one non-builtin trait is required for an object type

The second error seems to speak against the first two examples.

Tested using rustc 1.14.0-nightly (3f4408347 2016-10-27)

@Mark-Simulacrum Mark-Simulacrum added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label May 15, 2017
@Mark-Simulacrum
Copy link
Member

The latter compiles fine today; I guess this should get a test.

warning: type alias is never used: `Z`
 --> test.rs:1:1
  |
1 | type Z = for<'x> Send;
  | ^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: #[warn(dead_code)] on by default

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue Jun 22, 2017
Add tests for a few issues.

Fixes rust-lang#41998
Fixes rust-lang#38381
Fixes rust-lang#37515
Fixes rust-lang#37510
Fixes rust-lang#37508
Fixes rust-lang#37366
Fixes rust-lang#37323
Fixes rust-lang#37051
Fixes rust-lang#36839
Fixes rust-lang#35570
Fixes rust-lang#34373
Fixes rust-lang#34222

Certainly not all of the E-needstest issues right now, but I started to get bored.
bors added a commit that referenced this issue Jun 24, 2017
Add tests for a few issues.

Fixes #41998
Fixes #38381
Fixes #37515
Fixes #37510
Fixes #37366
Fixes #37323
Fixes #37051
Fixes #36839
Fixes #35570
Fixes #34373
Fixes #34222

Certainly not all of the E-needstest issues right now, but I started to get bored.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Projects
None yet
Development

No branches or pull requests

2 participants