Skip to content

Refactor upvar mode inference #20432

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 8 commits into from
Jan 3, 2015
Prev Previous commit
Next Next commit
Running EUV requires the Copy lang item, so adjust privacy tests.
  • Loading branch information
nikomatsakis committed Jan 3, 2015
commit 09a7bc55dbd2bd4e05253b2bd72e5ecfb5cf7dd2
3 changes: 3 additions & 0 deletions src/test/compile-fail/privacy1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
#[lang="sized"]
pub trait Sized {}

#[lang="copy"]
pub trait Copy {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no way the compiler could pretend to have Sized or Copy?
Not that I wouldn't use libcore for this, but sometimes libcore doesn't compile and I need a testcase.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be nice, but it's a big pain to propagate that pretending everywhere.


mod bar {
// shouldn't bring in too much
pub use self::glob::*;
Expand Down
1 change: 1 addition & 0 deletions src/test/compile-fail/privacy4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#![no_std] // makes debugging this test *a lot* easier (during resolve)

#[lang = "sized"] pub trait Sized for Sized? {}
#[lang="copy"] pub trait Copy {}

// Test to make sure that private items imported through globs remain private
// when they're used.
Expand Down