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

Remove reexports from core top level #5531

Closed
brson opened this issue Mar 25, 2013 · 2 comments
Closed

Remove reexports from core top level #5531

brson opened this issue Mar 25, 2013 · 2 comments
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@brson
Copy link
Contributor

brson commented Mar 25, 2013

In core.rc the 'Reexported core operators' and 'Reexported types and traits' sections should not exist. These are part of the prelude module now.

@sammykim
Copy link
Contributor

sammykim commented Apr 5, 2013

I take this. I will pull requests as soon as possible. But it seems there are another issue about this.
When I finish it, I will leave the comment about that issue with pull request.

@sammykim
Copy link
Contributor

sammykim commented Apr 5, 2013

Removing ops::{Drop}, ops::{BitAnd, BitOr, BitXor}, path::WindowsPath, path::PosixPath, num::NumCast is OK.
but another operators and traits can't be removed.

I think prelude doens't work properly.

e.g ops::{Shl, Shr, Index};
error message :
/home/sammy.kim/rust/src/libstd/bigint.rs:102:0: 108:1 error: attempt to implement an unknown trait
/home/sammy.kim/rust/src/libstd/bigint.rs:102 impl Shl<uint, BigUint> for BigUint {
/home/sammy.kim/rust/src/libstd/bigint.rs:103 fn shl(&self, rhs: &uint) -> BigUint {
/home/sammy.kim/rust/src/libstd/bigint.rs:104 let n_unit = *rhs / BigDigit::bits;
/home/sammy.kim/rust/src/libstd/bigint.rs:105 let n_bits = *rhs % BigDigit::bits;
/home/sammy.kim/rust/src/libstd/bigint.rs:106 return self.shl_unit(n_unit).shl_bits(n_bits);
/home/sammy.kim/rust/src/libstd/bigint.rs:107 }
...
/home/sammy.kim/rust/src/libstd/bigint.rs:110:0: 116:1 error: attempt to implement an unknown trait
/home/sammy.kim/rust/src/libstd/bigint.rs:110 impl Shr<uint, BigUint> for BigUint {
/home/sammy.kim/rust/src/libstd/bigint.rs:111 fn shr(&self, rhs: &uint) -> BigUint {
/home/sammy.kim/rust/src/libstd/bigint.rs:112 let n_unit = *rhs / BigDigit::bits;
/home/sammy.kim/rust/src/libstd/bigint.rs:113 let n_bits = *rhs % BigDigit::bits;
/home/sammy.kim/rust/src/libstd/bigint.rs:114 return self.shr_unit(n_unit).shr_bits(n_bits);
/home/sammy.kim/rust/src/libstd/bigint.rs:115 }
...
/home/sammy.kim/rust/src/libstd/bigint.rs:618:0: 622:1 error: attempt to implement an unknown trait
/home/sammy.kim/rust/src/libstd/bigint.rs:618 impl Shl<uint, BigInt> for BigInt {
/home/sammy.kim/rust/src/libstd/bigint.rs:619 fn shl(&self, rhs: &uint) -> BigInt {
/home/sammy.kim/rust/src/libstd/bigint.rs:620 BigInt::from_biguint(self.sign, self.data << *rhs)
/home/sammy.kim/rust/src/libstd/bigint.rs:621 }
/home/sammy.kim/rust/src/libstd/bigint.rs:622 }
/home/sammy.kim/rust/src/libstd/bigint.rs:624:0: 628:1 error: attempt to implement an unknown trait
/home/sammy.kim/rust/src/libstd/bigint.rs:624 impl Shr<uint, BigInt> for BigInt {
/home/sammy.kim/rust/src/libstd/bigint.rs:625 fn shr(&self, rhs: &uint) -> BigInt {
/home/sammy.kim/rust/src/libstd/bigint.rs:626 BigInt::from_biguint(self.sign, self.data >> *rhs)
/home/sammy.kim/rust/src/libstd/bigint.rs:627 }
/home/sammy.kim/rust/src/libstd/bigint.rs:628 }
error: aborting due to 4 previous errors

Plz leave comment
Thanks.

flip1995 pushed a commit to flip1995/rust that referenced this issue Feb 25, 2021
Rework use_self impl based on ty::Ty comparison rust-lang#3410 | Take 2

This builds on top of rust-lang#5531

I already reviewed and approved the commits by `@montrivo.` So only the review of my commits should be necessary.

I would also appreciate your review `@montrivo,` since you are familiar with the challenges here.

Fixes rust-lang#3410 and Fixes rust-lang#4143 (same problem)
Fixes rust-lang#2843
Fixes rust-lang#3859
Fixes rust-lang#4734 and fixes rust-lang#6221
Fixes rust-lang#4305
Fixes rust-lang#5078 (even at expression level now 🎉)
Fixes rust-lang#3881 and Fixes rust-lang#4887 (same problem)
Fixes rust-lang#3909

Not yet: rust-lang#4140 (test added)

All the credit for the fixes goes to `@montrivo.` I only refactored and copy and pasted his code.

changelog: rewrite [`use_self`] lint and fix multiple (8) FPs. One to go.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

3 participants