rust/compiler
Joshua Nelson 622c48e4f1 Allow making RUSTC_BOOTSTRAP conditional on the crate name
The main change is that `UnstableOptions::from_environment` now requires
an (optional) crate name. If the crate name is unknown (`None`), then the new feature is not available and you still have to use `RUSTC_BOOTSTRAP=1`. In practice this means the feature is only available for `--crate-name`, not for `#![crate_name]`; I'm interested in supporting the second but I'm not sure how.

Other major changes:

- Added `Session::is_nightly_build()`, which uses the `crate_name` of
the session
- Added `nightly_options::match_is_nightly_build`, a convenience method
for looking up `--crate-name` from CLI arguments.
`Session::is_nightly_build()`should be preferred where possible, since
it will take into account `#![crate_name]` (I think).
- Added `unstable_features` to `rustdoc::RenderOptions`

  There is a user-facing change here: things like `RUSTC_BOOTSTRAP=0` no
  longer active nightly features. In practice this shouldn't be a big
  deal, since `RUSTC_BOOTSTRAP` is the opposite of stable and everyone
  uses `RUSTC_BOOTSTRAP=1` anyway.

- Add tests

  Check against `Cheat`, not whether nightly features are allowed.
  Nightly features are always allowed on the nightly channel.

- Only call `is_nightly_build()` once within a function

- Use booleans consistently for rustc_incremental

  Sessions can't be passed through threads, so `read_file` couldn't take a
  session. To be consistent, also take a boolean in `write_file_header`.
2020-11-07 13:45:11 -05:00
..
rustc just max_level_info 2020-09-11 09:37:51 -07:00
rustc_apfloat Backport another LLVM commit to rustc_apfloat 2020-10-04 02:02:25 +02:00
rustc_arena Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_ast fix a couple of clippy warnings: 2020-11-04 13:48:50 +01:00
rustc_ast_lowering Allow making RUSTC_BOOTSTRAP conditional on the crate name 2020-11-07 13:45:11 -05:00
rustc_ast_passes Fix typos 2020-10-29 16:51:46 +01:00
rustc_ast_pretty Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_attr Improve deprecation attribute diagnostic messages. 2020-11-02 13:21:18 +01:00
rustc_builtin_macros Unconditionally capture tokens for attributes. 2020-10-21 18:57:29 -04:00
rustc_codegen_cranelift Fix even more URLs 2020-11-05 20:11:29 +01:00
rustc_codegen_llvm Allow making RUSTC_BOOTSTRAP conditional on the crate name 2020-11-07 13:45:11 -05:00
rustc_codegen_ssa Addressed all feedback to date 2020-11-05 18:24:17 -08:00
rustc_data_structures Move post order walk to iterative approach 2020-10-31 18:52:00 +01:00
rustc_driver Allow making RUSTC_BOOTSTRAP conditional on the crate name 2020-11-07 13:45:11 -05:00
rustc_error_codes Rollup merge of #78332 - PoignardAzur:doc_E0308, r=camelid 2020-10-27 08:44:54 +09:00
rustc_errors Auto merge of #76931 - oli-obk:const_prop_inline_lint_madness, r=wesleywiser 2020-11-03 16:32:34 +00:00
rustc_expand Rollup merge of #78626 - fusion-engineering-forks:deprecated-trait-impl, r=estebank 2020-11-03 19:32:36 +01:00
rustc_feature Allow making RUSTC_BOOTSTRAP conditional on the crate name 2020-11-07 13:45:11 -05:00
rustc_fs_util Remove unused code from remaining compiler crates 2020-10-14 04:14:32 +02:00
rustc_graphviz Rust coverage before splitting instrument_coverage.rs 2020-11-05 18:24:12 -08:00
rustc_hir Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_hir_pretty Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_incremental Allow making RUSTC_BOOTSTRAP conditional on the crate name 2020-11-07 13:45:11 -05:00
rustc_index cache types during normalization 2020-09-19 17:27:13 +02:00
rustc_infer fix a couple of clippy warnings: 2020-11-04 13:48:50 +01:00
rustc_interface fix a couple of clippy warnings: 2020-11-04 13:48:50 +01:00
rustc_lexer Add back missing comments 2020-10-30 10:13:41 -04:00
rustc_lint Rename lint to non_autolinks 2020-11-05 10:22:08 +01:00
rustc_lint_defs Fix more URLs 2020-11-05 10:23:39 +01:00
rustc_llvm Rollup merge of #77950 - arlosi:sha256, r=eddyb 2020-11-03 19:32:26 +01:00
rustc_macros Remove implicit Continue type 2020-10-30 12:27:47 +01:00
rustc_metadata Auto merge of #78448 - rylev:cache-foreign_modules, r=wesleywiser 2020-11-03 04:27:27 +00:00
rustc_middle Auto merge of #78267 - richkadel:llvm-coverage-counters-2.0.3r1, r=tmandry 2020-11-06 06:59:44 +00:00
rustc_mir Allow making RUSTC_BOOTSTRAP conditional on the crate name 2020-11-07 13:45:11 -05:00
rustc_mir_build Allow making RUSTC_BOOTSTRAP conditional on the crate name 2020-11-07 13:45:11 -05:00
rustc_parse Fix even more URLs 2020-11-05 20:11:29 +01:00
rustc_parse_format /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_passes Allow making RUSTC_BOOTSTRAP conditional on the crate name 2020-11-07 13:45:11 -05:00
rustc_plugin_impl /nightly/nightly-rustc 2020-09-23 21:51:56 +02:00
rustc_privacy Fix even more URLs 2020-11-05 20:11:29 +01:00
rustc_query_system Fix even more clippy warnings 2020-10-30 10:13:39 -04:00
rustc_resolve Allow making RUSTC_BOOTSTRAP conditional on the crate name 2020-11-07 13:45:11 -05:00
rustc_save_analysis Show the inline stack of MIR lints that only occur after inlining 2020-10-27 14:08:07 +00:00
rustc_serialize Replace absolute paths with relative ones 2020-10-13 14:16:45 +02:00
rustc_session Allow making RUSTC_BOOTSTRAP conditional on the crate name 2020-11-07 13:45:11 -05:00
rustc_span fix a couple of clippy warnings: 2020-11-04 13:48:50 +01:00
rustc_symbol_mangling u128 truncation and sign extension are not just interpreter related 2020-11-04 13:41:58 +00:00
rustc_target Fix automatic_links warnings 2020-11-05 10:22:08 +01:00
rustc_trait_selection Allow making RUSTC_BOOTSTRAP conditional on the crate name 2020-11-07 13:45:11 -05:00
rustc_traits Auto merge of #78182 - LeSeulArtichaut:ty-visitor-contolflow, r=lcnr,oli-obk 2020-10-30 22:53:55 +00:00
rustc_ty Calculate visibilities once in resolve 2020-10-19 11:57:50 +03:00
rustc_typeck Allow making RUSTC_BOOTSTRAP conditional on the crate name 2020-11-07 13:45:11 -05:00