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

use Trait::{}; acts as use Trait; #61826

Open
petrochenkov opened this issue Jun 14, 2019 · 0 comments
Open

use Trait::{}; acts as use Trait; #61826

petrochenkov opened this issue Jun 14, 2019 · 0 comments
Assignees
Labels
A-resolve Area: Name resolution C-bug Category: This is a bug. P-medium Medium priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@petrochenkov
Copy link
Contributor

mod m {
    pub trait Tr {
        fn method(&self) {}
    }
    
    impl<T> Tr for T {}
}

use m::Tr::{};

fn main() {
    // Expected behavior: error, `Tr` is not in scope.
    // Actual behavior: not an error.
    0u8.method();
}

The regression was introduced in c57f0a7 (Rust 1.31).

@petrochenkov petrochenkov self-assigned this Jun 14, 2019
@petrochenkov petrochenkov added A-resolve Area: Name resolution C-bug Category: This is a bug. regression-from-stable-to-stable Performance or correctness regression from one stable version to another. labels Jun 14, 2019
@jonas-schievink jonas-schievink added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 14, 2019
@spastorino spastorino added I-prioritize Issue: Indicates that prioritization has been requested for this issue. P-medium Medium priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-resolve Area: Name resolution C-bug Category: This is a bug. P-medium Medium priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants