Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign up#[linkage] does not propagate through generic functions #18804
Comments
alexcrichton
added
the
A-codegen
label
Nov 9, 2014
This comment has been minimized.
This comment has been minimized.
|
Triage: this is still true today, though |
This comment has been minimized.
This comment has been minimized.
|
@Mark-Simulacrum claims it repros still. |
brson
added
I-wrong
P-medium
labels
Jun 1, 2017
brson
added
the
T-compiler
label
Jun 1, 2017
nagisa
added
the
A-attributes
label
Jun 1, 2017
Mark-Simulacrum
added
C-bug
and removed
C-enhancement
I-wrong
labels
Jul 22, 2017
This comment has been minimized.
This comment has been minimized.
|
Updated test code: // lib.rs
#![feature(linkage)]
pub fn foo<T>() -> *const() {
extern {
#[linkage = "extern_weak"]
static FOO: *const();
}
unsafe { FOO }
}// main.rs
extern crate lib;
fn main() {
lib::foo::<i32>();
}Still fails to compile with the same errors mentioned in the top post along with the irrelevant invalid foreign type warning mentioned by @steveklabnik. |
yodaldevoid
added a commit
to yodaldevoid/rust
that referenced
this issue
Jul 23, 2018
yodaldevoid
added a commit
to yodaldevoid/rust
that referenced
this issue
Jul 23, 2018
yodaldevoid
added a commit
to yodaldevoid/rust
that referenced
this issue
Jul 23, 2018
yodaldevoid
added a commit
to yodaldevoid/rust
that referenced
this issue
Jul 23, 2018
yodaldevoid
referenced this issue
Jul 23, 2018
Merged
Fix #[linkage] propagation though generic functions #52635
bors
added a commit
that referenced
this issue
Jul 24, 2018
yodaldevoid
added a commit
to yodaldevoid/rust
that referenced
this issue
Jul 25, 2018
yodaldevoid
added a commit
to yodaldevoid/rust
that referenced
this issue
Jul 25, 2018
yodaldevoid
added a commit
to yodaldevoid/rust
that referenced
this issue
Jul 25, 2018
yodaldevoid
added a commit
to yodaldevoid/rust
that referenced
this issue
Jul 25, 2018
yodaldevoid
added a commit
to yodaldevoid/rust
that referenced
this issue
Jul 25, 2018
yodaldevoid
added a commit
to yodaldevoid/rust
that referenced
this issue
Jul 25, 2018
Mark-Simulacrum
added a commit
to Mark-Simulacrum/rust
that referenced
this issue
Jul 26, 2018
bors
closed this
in
#52635
Jul 26, 2018
pnkfelix
referenced this issue
Sep 12, 2018
Closed
linkage weak_extern through generics breaks when `-O` absent on OS X #54153
pnkfelix
referenced this issue
Dec 13, 2018
Merged
fix issue 54153 by not testing issue-18804 on Windows nor OS X. #56772
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
alexcrichton commentedNov 9, 2014
For example:
This can be a little more clearly seen with the IR generated for main:
Note the lack of
extern_weakanywhere onFOO.