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

Add support for upstream's 'edition' flag #180

Merged
merged 3 commits into from Sep 11, 2019
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -297,6 +297,10 @@ impl TestProps {
.map(|s| s.to_owned()));
}

if let Some(edition) = config.parse_edition(ln) {
self.compile_flags.push(format!("--edition={}", edition));
}

if let Some(r) = config.parse_revisions(ln) {
self.revisions.extend(r);
}
@@ -609,6 +613,10 @@ impl Config {
fn parse_rustfix_only_machine_applicable(&self, line: &str) -> bool {
self.parse_name_directive(line, "rustfix-only-machine-applicable")
}

fn parse_edition(&self, line: &str) -> Option<String> {
self.parse_name_value_directive(line, "edition")
}
}

pub fn lldb_version_to_int(version_string: &str) -> isize {
@@ -0,0 +1,10 @@
// edition:2018
// compile-pass

pub struct Foo;
impl Foo {
pub async fn foo(&mut self) {
}
}

fn main() {}