Skip to content

Commit 66a0f58

Browse files
committed
do not specify compatibility mechanism
1 parent 82e054d commit 66a0f58

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

text/0000a-build-std-compatible.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,8 @@ target modifier will trigger a rebuild of the standard library.
4747
> `rlib` artefact is compatible with the flags passed to rustc
4848
> ([?][rationale-rustc-support]).
4949
>
50-
> ```shell-session
51-
> $ rustc -Zreg-struct-return core/lib.rs -o libcore.rlib
52-
> $ rustc --emit compatibility $cargo_flags libcore.rlib
53-
> error: mixing `-Zreg-struct-return` will cause an ABI mismatch in crate `core`
54-
> ```
55-
>
56-
> In the above example, rustc compiles libcore with the `-Zreg-struct-return`
57-
> target modifier to create an `rlib`, and then is invoked to check the
58-
> compatibility of the flags Cargo would have passed to the crate against those
59-
> used with `libcore.rlib`. In this instance, the `rlib` was compiled with
60-
> `-Zreg-struct-return` and this example assumes that `$cargo_flags` does not
61-
> pass this flag, so rustc reports a mismatch.
50+
> The exact mechanism is not specified in this RFC. It may be a flag such as
51+
> `--compatibility-with=core` or an `--emit` or `--print` flag.
6252
>
6353
> Cargo can use this mechanism to determine whether it needs to rebuild the
6454
> standard library to ensure compatibility. Cargo will only need to run rustc

0 commit comments

Comments
 (0)