Skip to content

no mk_sp in codemap: compiling with latest rustc nightly fails #1646

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

Closed
atodorov opened this issue Mar 31, 2017 · 7 comments
Closed

no mk_sp in codemap: compiling with latest rustc nightly fails #1646

atodorov opened this issue Mar 31, 2017 · 7 comments

Comments

@atodorov
Copy link

atodorov commented Mar 31, 2017

I'm seeing lots of these errors:

 --> /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/clippy_lints-0.0.121/src/formatting.rs:2:5

  |

2 | use syntax::codemap::mk_sp;

  |     ^^^^^^^^^^^^^^^^^^^^^^ no `mk_sp` in `codemap`

Here's my Travis log:
https://travis-ci.org/atodorov/bdcs-api-rs/jobs/217103465

@oli-obk
Copy link
Contributor

oli-obk commented Mar 31, 2017

Yea, we need to rustup. Can someone please take this?

@polybuildr
Copy link
Contributor

Is there a temporary workaround? If I use the previous version of rust nightly, would I be able to compile clippy?

@oli-obk
Copy link
Contributor

oli-obk commented Apr 2, 2017

Use the nightly from 2017-03-28

@mirandadam
Copy link

Looking at the history of src/libsyntax/codemap.rs, it seems commit rust-lang/rust@f08d5ad no longer publishes mk_sp.

I figure that syntax_pos::Span should be used instead. mk_sp is now used as below in in src/libsyntax/parse/lexer/mod.rs:

fn mk_sp(lo: BytePos, hi: BytePos) -> Span {
    Span { lo: lo, hi: hi, ctxt: NO_EXPANSION }
}

Will try to whip out a P.R. in a few minutes.

@oli-obk
Copy link
Contributor

oli-obk commented Apr 7, 2017

we have a PR partially fixing this. But we broke a lint, so I don't want to publish yet

@mirandadam
Copy link

Awesome! Thanks for the quick reply.

@oli-obk
Copy link
Contributor

oli-obk commented Apr 7, 2017

Clippy has been updated and published for the latest nightly.

Sorry about the long wait

@oli-obk oli-obk closed this as completed Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants