First implementation of Rust 2018 modules.#332
Merged
emilio merged 2 commits intomozilla:masterfrom May 2, 2019
Merged
Conversation
hamchapman
reviewed
May 1, 2019
Contributor
Author
|
@hamchapman how's this? (I think I was accidentally relying on non-lexical lifetimes being turned on in nightly) |
|
Yep, all working very nicely for me now! Thanks 👍 |
Contributor
Author
|
Confirmed that using this patch I can upgrade gfx/wr to rust 2018 and build firefox. Still need a real release to do a try build to test all configs properly, though. |
emilio
approved these changes
May 2, 2019
Collaborator
emilio
left a comment
There was a problem hiding this comment.
It looks sane. I'm a bit concerned about scanning the lockfile over and over, but if this is a problem in practice we can optimize it, and you'll get some nice build-time regression bugs to remind you of that :)
src/bindgen/cargo/cargo.rs
Outdated
|
|
||
| let mut output = vec![]; | ||
|
|
||
| if let Some(dependencies) = dependencies { |
Collaborator
There was a problem hiding this comment.
nit: may be nicer to:
let dependencies = match dependencies {
Some(deps) => deps,
None => return vec![],
};
Then deindent everything below.
This changes our implementation to always ignore `extern crates`, favouring collecting metadata from `cargo metadata` (the Cargo.toml) and `Cargo.lock`. Future work might be needed to make this more robust.
… in nested crate case)
Collaborator
This was referenced Aug 10, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This changes our implementation to always ignore
extern crates, favouringcollecting metadata from
cargo metadata(the Cargo.toml) andCargo.lock.Future work might be needed to make this more robust.
Closes #331