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#81678 - jackh726:rollup-3nerni4, r=jackh726
Rollup of 14 pull requests Successful merges: - rust-lang#80593 (Upgrade Chalk) - rust-lang#81260 (Add .editorconfig) - rust-lang#81455 (Add AArch64 big-endian and ILP32 targets) - rust-lang#81517 (Remove remnants of the santizer runtime crates from bootstrap) - rust-lang#81530 (sys: use `process::abort()` instead of `arch::wasm32::unreachable()`) - rust-lang#81544 (Add better diagnostic for unbounded Abst. Const) - rust-lang#81588 (Add doc aliases for "delete") - rust-lang#81603 (rustbuild: Don't build compiler twice for error-index-generator.) - rust-lang#81634 (Add long explanation e0521) - rust-lang#81636 (Directly use `Option<&[T]>` instead of converting from `Option<&Vec<T>>` later on) - rust-lang#81647 (Fix bug with assert!() calling the wrong edition of panic!().) - rust-lang#81655 (Improve wording of suggestion about accessing field) - rust-lang#81665 (Fix out of date `Scalar` documentation) - rust-lang#81671 (Add more associated type tests) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
79 changed files
with
645 additions
and
202 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# EditorConfig helps developers define and maintain consistent | ||
# coding styles between different editors and IDEs | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.md] | ||
# double whitespace at end of line | ||
# denotes a line break in Markdown | ||
trim_trailing_whitespace = false | ||
|
||
[*.yml] | ||
indent_size = 2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Borrowed data escapes outside of closure. | ||
|
||
Erroneous code example: | ||
|
||
```compile_fail,E0521 | ||
let mut list: Vec<&str> = Vec::new(); | ||
let _add = |el: &str| { | ||
list.push(el); // error: `el` escapes the closure body here | ||
}; | ||
``` | ||
|
||
A type anotation of a closure parameter implies a new lifetime declaration. | ||
Consider to drop it, the compiler is reliably able to infer them. | ||
|
||
``` | ||
let mut list: Vec<&str> = Vec::new(); | ||
let _add = |el| { | ||
list.push(el); | ||
}; | ||
``` | ||
|
||
See the [Closure type inference and annotation][closure-infere-annotation] and | ||
[Lifetime elision][lifetime-elision] sections of the Book for more details. | ||
|
||
[closure-infere-annotation]: https://doc.rust-lang.org/book/ch13-01-closures.html#closure-type-inference-and-annotation | ||
[lifetime-elision]: https://doc.rust-lang.org/reference/lifetime-elision.html |
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
20 changes: 20 additions & 0 deletions
20
compiler/rustc_target/src/spec/aarch64_be_unknown_linux_gnu.rs
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,20 @@ | ||
use crate::abi::Endian; | ||
use crate::spec::{Target, TargetOptions}; | ||
|
||
pub fn target() -> Target { | ||
let mut base = super::linux_gnu_base::opts(); | ||
base.max_atomic_width = Some(128); | ||
|
||
Target { | ||
llvm_target: "aarch64_be-unknown-linux-gnu".to_string(), | ||
pointer_width: 64, | ||
data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), | ||
arch: "aarch64".to_string(), | ||
options: TargetOptions { | ||
unsupported_abis: super::arm_base::unsupported_abis(), | ||
mcount: "\u{1}_mcount".to_string(), | ||
endian: Endian::Big, | ||
..base | ||
}, | ||
} | ||
} |
Oops, something went wrong.