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

Update Path constructor to new conventions #5389

Closed
brson opened this issue Mar 14, 2013 · 4 comments
Closed

Update Path constructor to new conventions #5389

brson opened this issue Mar 14, 2013 · 4 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.
Milestone

Comments

@brson
Copy link
Contributor

brson commented Mar 14, 2013

Should have a static new method.

Subset of #3853

@brson
Copy link
Contributor Author

brson commented Mar 15, 2013

More or less blocked on #4202

@thomaslee
Copy link
Contributor

@brson I did some investigatory digging into this issue with my fix for #4202 in place & unfortunately I suspect that reexports of traits are still broken enough in certain cases that Path::new won't work. That said, I do plan to dig deeper into the underlying issues with trait reexports once my girlfriend forgives me for the past ~week or so of neglect. :P

bors added a commit that referenced this issue May 20, 2013
My earlier fix for #4202 would not work correctly if the trait being exported was a top-level item relative to the module from which it was being exported. An example that would not work correctly with the original patch:

    // foo.rs

    pub use Foo = self::Bar;

    pub trait Bar {
      pub fn bar() -> Self;
    }

    impl Bar for int {
      pub fn bar() -> int { 42 }
    }

    // bar.rs

    fn main() {
      foo::Foo::bar()
    }

This is now supported.

I believe this change will allow the GenericPath trait to be exported from core::path as Path in such a manner, which should allow #5389 to move forward.
@thomaslee
Copy link
Contributor

@brson to be crystal clear: we're essentially removing WindowsPath & PosixPath methods, aliasing GenericPath as Path with a "pub use ..." & renaming GenericPath::from_str to GenericPath::new here, right?

@metajack
Copy link
Contributor

revisiting for triage. seems correctly nominated and still an issue.

@bors bors closed this as completed in e97d616 Oct 16, 2013
flip1995 added a commit to flip1995/rust that referenced this issue Jun 23, 2020
Fix ICE in consts::binop

changelog: Fix ICE in `consts::binop`

Fixes rust-lang#5389
calebcartwright pushed a commit to calebcartwright/rust that referenced this issue Jun 23, 2022
* config_proc_macro: fix failing doctests

* ci: include config_proc_macro crate in ci

* [review] working native windows ci

* [fix] add --locked file for ci

* [fix] quoting of cmd variables
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