forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#106266 - matthiaskrgr:rollup-cxrdbzy, r=matth…
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#104531 (Provide a better error and a suggestion for `Fn` traits with lifetime params) - rust-lang#105899 (`./x doc library --open` opens `std`) - rust-lang#106190 (Account for multiple multiline spans with empty padding) - rust-lang#106202 (Trim more paths in obligation types) - rust-lang#106234 (rustdoc: simplify settings, help, and copy button CSS by not reusing) - rust-lang#106236 (docs/test: add docs and a UI test for `E0514` and `E0519`) - rust-lang#106259 (Update Clippy) - rust-lang#106260 (Fix index out of bounds issues in rustdoc) - rust-lang#106263 (Formatter should not try to format non-Rust files) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
128 changed files
with
2,902 additions
and
433 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Dependency compiled with different version of `rustc`. | ||
|
||
Example of erroneous code: | ||
|
||
`a.rs` | ||
```ignore (cannot-link-with-other-tests) | ||
// compiled with stable `rustc` | ||
#[crate_type = "lib"] | ||
``` | ||
|
||
`b.rs` | ||
```ignore (cannot-link-with-other-tests) | ||
// compiled with nightly `rustc` | ||
#[crate_type = "lib"] | ||
extern crate a; // error: found crate `a` compiled by an incompatible version | ||
// of rustc | ||
``` | ||
|
||
This error is caused when the version of `rustc` used to compile a crate, as | ||
stored in the binary's metadata, differs from the version of one of its | ||
dependencies. Many parts of Rust binaries are considered unstable. For | ||
instance, the Rust ABI is not stable between compiler versions. This means that | ||
the compiler cannot be sure about *how* to call a function between compiler | ||
versions, and therefore this error occurs. | ||
|
||
This error can be fixed by: | ||
* Using [Cargo](../cargo/index.html), the Rust package manager and | ||
[Rustup](https://rust-lang.github.io/rustup/), the Rust toolchain installer, | ||
automatically fixing this issue. | ||
* Recompiling the crates with a uniform `rustc` version. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
The current crate is indistinguishable from one of its dependencies, in terms | ||
of metadata. | ||
|
||
Example of erroneous code: | ||
|
||
`a.rs` | ||
```ignore (cannot-link-with-other-tests) | ||
#![crate_name = "a"] | ||
#![crate_type = "lib"] | ||
pub fn foo() {} | ||
``` | ||
|
||
`b.rs` | ||
```ignore (cannot-link-with-other-tests) | ||
#![crate_name = "a"] | ||
#![crate_type = "lib"] | ||
// error: the current crate is indistinguishable from one of its dependencies: | ||
// it has the same crate-name `a` and was compiled with the same | ||
// `-C metadata` arguments. This will result in symbol conflicts between | ||
// the two. | ||
extern crate a; | ||
pub fn foo() {} | ||
fn bar() { | ||
a::foo(); // is this calling the local crate or the dependency? | ||
} | ||
``` | ||
|
||
The above example compiles two crates with exactly the same name and | ||
`crate_type` (plus any other metadata). This causes an error because it becomes | ||
impossible for the compiler to distinguish between symbols (`pub` item names). | ||
|
||
This error can be fixed by: | ||
* Using [Cargo](../cargo/index.html), the Rust package manager, automatically | ||
fixing this issue. | ||
* Recompiling the crate with different metadata (different name/ | ||
`crate_type`). |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.