Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 13 pull requests #62419

Merged
merged 46 commits into from
Jul 5, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
7d0a952
Implement initernal lint LINT_PASS_IMPL_WITHOUT_MACRO
flip1995 May 2, 2019
37f09cb
Only allow {declare,impl}_lint_pass macros for implementing LintPass
flip1995 Jun 13, 2019
084c829
Enable internal lints in bootstrap
flip1995 Jun 17, 2019
65c81de
Allow default_hash_types in some crates
flip1995 Jun 17, 2019
08b81f2
Rename internal -> rustc::internal
flip1995 Jun 17, 2019
7de6f54
Turn internal lints into tool lints
flip1995 Jun 24, 2019
8e087cd
Use symbols in lint tool list
flip1995 Jun 24, 2019
d0625a3
Allow usage_of_ty_tykind only in sty
flip1995 Jun 24, 2019
e475539
Add MemoryExtra in InterpretCx constructor params
pvdrz Jun 26, 2019
e32b8eb
Remove default bound for Machine::MemoryExtra
pvdrz Jun 26, 2019
0ffb643
Make sure `#[rustc_doc_only_macro]` and other rustc attributes are re…
petrochenkov Jun 29, 2019
e4e7eb2
Feature gate `rustc` attributes harder
petrochenkov Jun 30, 2019
e45bbaf
Fix merge conflicts
pvdrz Jul 4, 2019
7987719
remove FIXMEs for functions that won't go away
ljedrz Jun 27, 2019
4f7ba51
rename hir::map::local_def_id to local_def_id_from_node_id
ljedrz Jun 27, 2019
37d7e1f
rename hir::map::local_def_id_from_hir_id to local_def_id
ljedrz Jun 27, 2019
c6131b2
rename hir::map::opt_local_def_id*
ljedrz Jun 27, 2019
01e0d83
infer::error_reporting: adjust 2 debug messages
ljedrz Jun 28, 2019
675bfb6
fix a dep_graph doc regarding type_of_item
ljedrz Jul 2, 2019
a6030ff
infer: fix a Region-related debug message
ljedrz Jul 2, 2019
7f035ba
Fix a typo in Write::write_vectored docs
pawroman Jul 4, 2019
61ddf5e
Create async version of the dynamic-drop test
matthewjasper Jun 27, 2019
f4b30f4
Update README.md
markebrooks Jul 4, 2019
90419d3
Remove `solve_nll_region_constraints` measurements from `-Ztime-passe…
nnethercote Jun 25, 2019
87b103d
Add a "total" measurement to -Ztime-passes.
nnethercote Jun 25, 2019
50510e4
remove Scalar::is_null_ptr
RalfJung Jul 5, 2019
050a71b
rustc_target: avoid negative register counts in the SysV x86_64 ABI.
eddyb Jul 4, 2019
f01e5e6
Lint on invalid values passed to x.py --warnings
Mark-Simulacrum Jul 5, 2019
7fb17d8
Remove last use of mem::uninitialized in SGX
Jul 5, 2019
ce77031
Remove compile-pass from compiletest
JohnTitor Jul 4, 2019
db93d01
Remove compile-pass from error codes' explanation
JohnTitor Jul 4, 2019
211b52b
Update rustc-guide
JohnTitor Jul 4, 2019
1640ab2
Fix test annotation
JohnTitor Jul 5, 2019
485a084
Rollup merge of #61545 - flip1995:internal_lints, r=oli-obk
Centril Jul 5, 2019
40841e0
Rollup merge of #62110 - nnethercote:improve-Ztime-passes, r=Zoxc
Centril Jul 5, 2019
0224532
Rollup merge of #62133 - petrochenkov:norustc, r=eddyb
Centril Jul 5, 2019
b41a62e
Rollup merge of #62158 - christianpoveda:ecx-memory-extra, r=RalfJung
Centril Jul 5, 2019
2e86c00
Rollup merge of #62168 - ljedrz:the_culmination_of_hiridification, r=…
Centril Jul 5, 2019
30aa245
Rollup merge of #62193 - matthewjasper:dynamic-drop-async, r=Centril
Centril Jul 5, 2019
216a187
Rollup merge of #62369 - JohnTitor:remove-compile-pass, r=petrochenkov
Centril Jul 5, 2019
58f402a
Rollup merge of #62380 - eddyb:x64-sysv-regs, r=nagisa
Centril Jul 5, 2019
c5d1860
Rollup merge of #62381 - pawroman:fix_typo_in_write_vectored, r=Centril
Centril Jul 5, 2019
4ac3e62
Rollup merge of #62390 - markebrooks:encourage, r=Centril
Centril Jul 5, 2019
3c2cba8
Rollup merge of #62396 - RalfJung:miri-no-null, r=alexcrichton
Centril Jul 5, 2019
cc453d9
Rollup merge of #62406 - Mark-Simulacrum:warnings-lint, r=RalfJung
Centril Jul 5, 2019
e89bd8c
Rollup merge of #62414 - jethrogb:jb/sgx-uninit, r=Mark-Simulacrum
Centril Jul 5, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ impl Config {
config.incremental = flags.incremental;
config.dry_run = flags.dry_run;
config.keep_stage = flags.keep_stage;
if let Some(value) = flags.warnings {
if let Some(value) = flags.deny_warnings {
config.deny_warnings = value;
}

Expand Down Expand Up @@ -571,7 +571,7 @@ impl Config {
config.rustc_default_linker = rust.default_linker.clone();
config.musl_root = rust.musl_root.clone().map(PathBuf::from);
config.save_toolstates = rust.save_toolstates.clone().map(PathBuf::from);
set(&mut config.deny_warnings, rust.deny_warnings.or(flags.warnings));
set(&mut config.deny_warnings, flags.deny_warnings.or(rust.deny_warnings));
set(&mut config.backtrace_on_ice, rust.backtrace_on_ice);
set(&mut config.rust_verify_llvm_ir, rust.verify_llvm_ir);
set(&mut config.rust_remap_debuginfo, rust.remap_debuginfo);
Expand Down
24 changes: 21 additions & 3 deletions src/bootstrap/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ pub struct Flags {
pub rustc_error_format: Option<String>,
pub dry_run: bool,

// true => deny
pub warnings: Option<bool>,
// This overrides the deny-warnings configuation option,
// which passes -Dwarnings to the compiler invocations.
//
// true => deny, false => allow
pub deny_warnings: Option<bool>,
}

pub enum Subcommand {
Expand Down Expand Up @@ -468,7 +471,7 @@ Arguments:
.into_iter()
.map(|p| p.into())
.collect::<Vec<_>>(),
warnings: matches.opt_str("warnings").map(|v| v == "deny"),
deny_warnings: parse_deny_warnings(&matches),
}
}
}
Expand Down Expand Up @@ -549,3 +552,18 @@ fn split(s: &[String]) -> Vec<String> {
.map(|s| s.to_string())
.collect()
}

fn parse_deny_warnings(matches: &getopts::Matches) -> Option<bool> {
match matches.opt_str("warnings").as_ref().map(|v| v.as_str()) {
Some("deny") => Some(true),
Some("allow") => Some(false),
Some(value) => {
eprintln!(
r#"invalid value for --warnings: {:?}, expected "allow" or "deny""#,
value,
);
process::exit(1);
},
None => None,
}
}