Sidestep link error from rustfix'ed code by using a *defined* static.#55719
Merged
bors merged 2 commits intorust-lang:masterfrom Nov 9, 2018
Merged
Conversation
As a drive-by, added `-g` to the compile-flags so that the test more reliably fails to compile when the extern static in question is *not* provided. (I.e. this is making the test more robust in the face of potential future revisions.) Fix rust-lang#54388.
Contributor
|
(rust_highfive has picked a reviewer for you, use r? to override) |
Member
|
@bors: r+ rollup |
Collaborator
|
📌 Commit e7f8c0d has been approved by |
Member
|
@bors r- Failed in the rollup #55746 (comment) for Error message---- [ui] ui/extern/extern-const.rs stdout ----
diff of stderr:
4 LL | const rust_dbg_static_mut: libc::c_int; //~ ERROR extern items cannot be `const`
5 | ^^^^^ help: try using a static value: `static`
6
- error: aborting due to previous error
+ error[E0412]: cannot find type `c_int` in module `libc`
+ --> $DIR/extern-const.rs:15:38
+ |
+ LL | const rust_dbg_static_mut: libc::c_int; //~ ERROR extern items cannot be `const`
+ | ^^^^^ not found in `libc`
+ help: possible candidate is found in another module, you can import it into scope
+ |
+ LL | use std::os::raw::c_int;
+ |
8
+ error: aborting due to 2 previous errors
+
+ For more information about this error, try `rustc --explain E0412`.
9
The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/extern/extern-const/extern-const.stderr
diff of fixed:
10 #![feature(libc)]
11 extern crate libc;
12
+ use std::os::raw::c_int;
+
13 #[link(name = "rust_test_helpers", kind = "static")]
14 extern "C" {
15 static rust_dbg_static_mut: libc::c_int; //~ ERROR extern items cannot be `const`
The actual fixed differed from the expected fixed. |
Contributor
Author
Probably not. But I'm pretty sure So I think I'll just add a |
Contributor
Author
|
(marking as Work-In-Progress while dafd2e8 gets tested...) |
dafd2e8 to
34ffbdb
Compare
Contributor
Author
|
@bors r=alexcrichton rollup |
Collaborator
|
📌 Commit 34ffbdb has been approved by |
kennytm
added a commit
to kennytm/rust
that referenced
this pull request
Nov 8, 2018
…error-from-rustfixed-code, r=alexcrichton Sidestep link error from rustfix'ed code by using a *defined* static. As a drive-by, added `-g` to the compile-flags so that the test more reliably fails to compile when the extern static in question is *not* provided. (I.e. this is making the test more robust in the face of potential future revisions.) Fix rust-lang#54388.
Mark-Simulacrum
added a commit
to Mark-Simulacrum/rust
that referenced
this pull request
Nov 9, 2018
…error-from-rustfixed-code, r=alexcrichton Sidestep link error from rustfix'ed code by using a *defined* static. As a drive-by, added `-g` to the compile-flags so that the test more reliably fails to compile when the extern static in question is *not* provided. (I.e. this is making the test more robust in the face of potential future revisions.) Fix rust-lang#54388.
bors
added a commit
that referenced
this pull request
Nov 9, 2018
Rollup of 17 pull requests Successful merges: - #55576 (Clarify error message for -C opt-level) - #55633 (Support memcpy/memmove with differing src/dst alignment) - #55638 (Fix ICE in msg_span_from_free_region on ReEmpty) - #55659 (rustc: Delete grouping logic from the musl target) - #55719 (Sidestep link error from rustfix'ed code by using a *defined* static.) - #55736 (Elide anon lifetimes in conflicting impl note) - #55739 (Consume optimization fuel from the MIR inliner) - #55742 (Avoid panic when matching function call) - #55753 (borrow_set: remove a helper function and a clone it uses) - #55755 (Improve creation of 3 IndexVecs) - #55758 ([regression - rust2018]: unused_mut lint false positives on nightly) - #55760 (Remove intermediate font specs) - #55761 (mir: remove a hacky recursive helper function) - #55774 (wasm32-unknown-emscripten expects the rust_eh_personality symbol) - #55777 (Use `Lit` rather than `P<Lit>` in `ast::ExprKind`.) - #55783 (Deprecate mpsc channel selection) - #55788 (rustc: Request ansi colors if stderr isn't a tty) Failed merges: r? @ghost
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.
As a drive-by, added
-gto the compile-flags so that the test morereliably fails to compile when the extern static in question is not
provided. (I.e. this is making the test more robust in the face of
potential future revisions.)
Fix #54388.