Skip to content

store the rustc version in metadata and check it - #28702

Merged
bors merged 2 commits into
rust-lang:masterfrom
arielb1:metadata-versioning
Sep 30, 2015
Merged

store the rustc version in metadata and check it#28702
bors merged 2 commits into
rust-lang:masterfrom
arielb1:metadata-versioning

Conversation

@arielb1

Copy link
Copy Markdown
Contributor

This prevents ICEs when old crates are used with a new version of
rustc. Currently, the linking of crates compiled with different
versions of rustc is completely unsupported.

Fixes#28700

r? @nrc

@nrc

nrc commented Sep 28, 2015

Copy link
Copy Markdown
Member

@bors: r+

@bors

bors commented Sep 28, 2015

Copy link
Copy Markdown
Collaborator

📌 Commit debc1b9 has been approved by nrc

@nagisa

Copy link
Copy Markdown
Member

Is rustc x.y enough? Maybe a version + commit would be better?

I'm pretty sure there’s a non-trivial population using nightly and these are not compatible between compiles either, are they?

@arielb1

Copy link
Copy Markdown
ContributorAuthor

CFG_VERSION is what rustc --version outputs - for example, 1.4.0-nightly (8f1b0aa32 2015-08-21).

@bors

bors commented Sep 28, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit debc1b9 with merge 804326a...

@bors

bors commented Sep 28, 2015

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-linux-32-opt

@eefriedman

Copy link
Copy Markdown
Contributor
../src/librustc/middle/expr_use_visitor.rs:283:9: 287:10 error: cannot infer an appropriate lifetime for lifetime parameter `'tcx` due to conflicting requirements
../src/librustc/middle/expr_use_visitor.rs:283 ExprUseVisitor {
../src/librustc/middle/expr_use_visitor.rs:284 typer: typer,
../src/librustc/middle/expr_use_visitor.rs:285 mc: mc::MemCategorizationContext::new(typer),
../src/librustc/middle/expr_use_visitor.rs:286 delegate: delegate,
../src/librustc/middle/expr_use_visitor.rs:287 }
../src/librustc/middle/expr_use_visitor.rs:279:5: 288:6 help: consider using an explicit lifetime parameter as shown: fn new(delegate: &'d mut Delegate<'tcx>, typer: &'t infer::InferCtxt<'a, 'a>)
-> ExprUseVisitor<'d, 't, 'a, 'a>
../src/librustc/middle/expr_use_visitor.rs:279 pub fn new(delegate: &'d mut Delegate<'tcx>,
../src/librustc/middle/expr_use_visitor.rs:280 typer: &'t infer::InferCtxt<'a, 'tcx>)
../src/librustc/middle/expr_use_visitor.rs:281 -> ExprUseVisitor<'d,'t,'a,'tcx>
../src/librustc/middle/expr_use_visitor.rs:282 {
../src/librustc/middle/expr_use_visitor.rs:283 ExprUseVisitor {
../src/librustc/middle/expr_use_visitor.rs:284 typer: typer,
...
error: aborting due to previous error

This prevents ICEs when old crates are used with a new version of
rustc. Currently, the linking of crates compiled with different
versions of rustc is completely unsupported.
Fixesrust-lang#28700
@arielb1

Copy link
Copy Markdown
ContributorAuthor

@bors r=nrc 9699adc

@bors

bors commented Sep 29, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 9699adc with merge ac17bcf...

@bors

bors commented Sep 29, 2015

Copy link
Copy Markdown
Collaborator

💔 Test failed - auto-win-msvc-32-opt

@arielb1

Copy link
Copy Markdown
ContributorAuthor

This compiles locally. Why can't it compile on bors too?

@arielb1

Copy link
Copy Markdown
ContributorAuthor

@bors r=nrc f2d5ebe

@nrcnrc mentioned this pull request Sep 29, 2015
@nrc

nrc commented Sep 29, 2015

Copy link
Copy Markdown
Member

@arielb1 it's an intermittent bug, so annoying. Try adding let result = ...; result that sometimes works.

@bors

bors commented Sep 29, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit f2d5ebe with merge 65d5c08...

bors added a commit that referenced this pull request Sep 29, 2015
This prevents ICEs when old crates are used with a new version of
rustc. Currently, the linking of crates compiled with different
versions of rustc is completely unsupported.
Fixes#28700
r? @nrc
@bors
bors merged commit f2d5ebe into rust-lang:masterSep 30, 2015
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@arielb1@nrc@bors@nagisa@eefriedman