Skip to content

Commit 2628f57

Browse files
committed
Auto merge of #63371 - Centril:rollup-k0xtdcz, r=Centril
Rollup of 7 pull requests Successful merges: - #62994 (Add test for #43398) - #63259 (Add tests for some issues) - #63327 (doc: Reword deprecation message of MetadataExt::as_raw_stat) - #63331 (Test conditional initialization validation in async fns) - #63334 (Update to rustc-guide that passes toolstate) - #63353 (Update books) - #63360 (Use consistent capitalization in -C/-Z help) Failed merges: r? @ghost
2 parents 0452340 + 83fbf62 commit 2628f57

18 files changed

+127
-15
lines changed

src/doc/edition-guide

src/doc/nomicon

src/doc/reference

src/doc/rustc-guide

src/librustc/session/config.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options,
11551155
passes: Vec<String> = (Vec::new(), parse_list, [TRACKED],
11561156
"a list of extra LLVM passes to run (space separated)"),
11571157
llvm_args: Vec<String> = (Vec::new(), parse_list, [TRACKED],
1158-
"a list of arguments to pass to llvm (space separated)"),
1158+
"a list of arguments to pass to LLVM (space separated)"),
11591159
save_temps: bool = (false, parse_bool, [UNTRACKED],
11601160
"save all temporary output files during compilation"),
11611161
rpath: bool = (false, parse_bool, [UNTRACKED],
@@ -1208,7 +1208,7 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options,
12081208
default_linker_libraries: Option<bool> = (None, parse_opt_bool, [UNTRACKED],
12091209
"allow the linker to link its default libraries"),
12101210
linker_flavor: Option<LinkerFlavor> = (None, parse_linker_flavor, [UNTRACKED],
1211-
"Linker flavor"),
1211+
"linker flavor"),
12121212
linker_plugin_lto: LinkerPluginLto = (LinkerPluginLto::Disabled,
12131213
parse_linker_plugin_lto, [TRACKED],
12141214
"generate build artifacts that are compatible with linker-based LTO."),
@@ -1255,7 +1255,7 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
12551255
print_link_args: bool = (false, parse_bool, [UNTRACKED],
12561256
"print the arguments passed to the linker"),
12571257
print_llvm_passes: bool = (false, parse_bool, [UNTRACKED],
1258-
"prints the llvm optimization passes being run"),
1258+
"prints the LLVM optimization passes being run"),
12591259
ast_json: bool = (false, parse_bool, [UNTRACKED],
12601260
"print the AST as JSON and halt"),
12611261
threads: Option<usize> = (None, parse_opt_uint, [UNTRACKED],
@@ -1375,11 +1375,11 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
13751375
osx_rpath_install_name: bool = (false, parse_bool, [TRACKED],
13761376
"pass `-install_name @rpath/...` to the macOS linker"),
13771377
sanitizer: Option<Sanitizer> = (None, parse_sanitizer, [TRACKED],
1378-
"Use a sanitizer"),
1378+
"use a sanitizer"),
13791379
fuel: Option<(String, u64)> = (None, parse_optimization_fuel, [TRACKED],
13801380
"set the optimization fuel quota for a crate"),
13811381
print_fuel: Option<String> = (None, parse_opt_string, [TRACKED],
1382-
"make Rustc print the total optimization fuel used by a crate"),
1382+
"make rustc print the total optimization fuel used by a crate"),
13831383
force_unstable_if_unmarked: bool = (false, parse_bool, [TRACKED],
13841384
"force all crates to be `rustc_private` unstable"),
13851385
pre_link_arg: Vec<String> = (vec![], parse_string_push, [UNTRACKED],
@@ -1417,7 +1417,7 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
14171417
"in dep-info output, omit targets for tracking dependencies of the dep-info files \
14181418
themselves"),
14191419
unpretty: Option<String> = (None, parse_unpretty, [UNTRACKED],
1420-
"Present the input source, unstable (and less-pretty) variants;
1420+
"present the input source, unstable (and less-pretty) variants;
14211421
valid types are any of the types for `--pretty`, as well as:
14221422
`expanded`, `expanded,identified`,
14231423
`expanded,hygiene` (with internal representations),

src/libstd/os/linux/fs.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ pub trait MetadataExt {
3434
/// }
3535
/// ```
3636
#[stable(feature = "metadata_ext", since = "1.1.0")]
37-
#[rustc_deprecated(since = "1.8.0",
38-
reason = "deprecated in favor of the accessor \
39-
methods of this trait")]
37+
#[rustc_deprecated(
38+
since = "1.8.0",
39+
reason = "other methods of this trait are now prefered"
40+
)]
4041
#[allow(deprecated)]
4142
fn as_raw_stat(&self) -> &raw::stat;
4243

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// check-pass
2+
// edition:2018
3+
// compile-flags: --crate-type lib
4+
5+
#![feature(async_await)]
6+
7+
async fn conditional_and_guaranteed_initialization(x: usize) -> usize {
8+
let y;
9+
if x > 5 {
10+
y = echo(10).await;
11+
} else {
12+
y = get_something().await;
13+
}
14+
y
15+
}
16+
17+
async fn echo(x: usize) -> usize { x }
18+
async fn get_something() -> usize { 10 }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// compile-fail
2+
// edition:2018
3+
// compile-flags: --crate-type lib
4+
5+
#![feature(async_await)]
6+
7+
async fn no_non_guaranteed_initialization(x: usize) -> usize {
8+
let y;
9+
if x > 5 {
10+
y = echo(10).await;
11+
}
12+
y
13+
//~^ use of possibly uninitialized variable: `y`
14+
}
15+
16+
async fn echo(x: usize) -> usize { x + 1 }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error[E0381]: use of possibly uninitialized variable: `y`
2+
--> $DIR/no-non-guaranteed-initialization.rs:12:5
3+
|
4+
LL | y
5+
| ^ use of possibly uninitialized `y`
6+
7+
error: aborting due to previous error
8+
9+
For more information about this error, try `rustc --explain E0381`.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#![crate_type = "lib"]
2+
3+
pub struct SomeType {
4+
pub some_member: usize,
5+
}
6+
7+
pub static SOME_VALUE: SomeType = SomeType {
8+
some_member: 1,
9+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#![crate_type = "lib"]
2+
3+
pub fn foo() -> Vec<String> {
4+
std::env::args()
5+
.skip(1)
6+
.collect()
7+
}

src/test/ui/issues/issue-29265.rs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// aux-build:issue-29265.rs
2+
// check-pass
3+
4+
extern crate issue_29265 as lib;
5+
6+
static _UNUSED: &'static lib::SomeType = &lib::SOME_VALUE;
7+
8+
fn main() {
9+
vec![0u8; lib::SOME_VALUE.some_member];
10+
}

src/test/ui/issues/issue-37433.rs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// ignore-emscripten no asm! support
2+
3+
#![feature(asm)]
4+
5+
fn main() {
6+
unsafe {
7+
asm!("" :: "r"(""));
8+
//~^ ERROR: invalid value for constraint in inline assembly
9+
}
10+
}

src/test/ui/issues/issue-37433.stderr

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error[E0669]: invalid value for constraint in inline assembly
2+
--> $DIR/issue-37433.rs:7:24
3+
|
4+
LL | asm!("" :: "r"(""));
5+
| ^^
6+
7+
error: aborting due to previous error
8+

src/test/ui/issues/issue-43398.rs

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// run-pass
2+
3+
#![feature(core_intrinsics)]
4+
#![feature(repr128)]
5+
6+
#[repr(i128)]
7+
enum Big { A, B }
8+
9+
fn main() {
10+
unsafe {
11+
println!("{} {:?}",
12+
std::intrinsics::discriminant_value(&Big::A),
13+
std::mem::discriminant(&Big::B));
14+
}
15+
}

src/test/ui/issues/issue-49544.rs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// aux-build:issue-49544.rs
2+
// check-pass
3+
4+
extern crate issue_49544;
5+
use issue_49544::foo;
6+
7+
fn main() {
8+
let _ = foo();
9+
}

0 commit comments

Comments
 (0)