summary refs log tree commit diff
path: root/compiler/rustc_session/src/parse.rs
AgeCommit message (Collapse)AuthorLines
2021-03-27Remove (lots of) dead codeJoshua Nelson-0/+1
Found with https://github.com/est31/warnalyzer. Dubious changes: - Is anyone else using rustc_apfloat? I feel weird completely deleting x87 support. - Maybe some of the dead code in rustc_data_structures, in case someone wants to use it in the future? - Don't change rustc_serialize I plan to scrap most of the json module in the near future (see https://github.com/rust-lang/compiler-team/issues/418) and fixing the tests needed more work than I expected. TODO: check if any of the comments on the deleted code should be kept.
2021-03-05expand: Move module file path stack from global session to expansion dataVadim Petrochenkov-4/+0
Also don't push the paths on the stack directly in `fn parse_external_mod`, return them instead.
2021-01-29Treat nightlies for a version as completeest31-0/+3
This commit makes cfg(version) treat the nightlies for version 1.n.0 as 1.n.0, even though that nightly version might not have all stabilizations and features of the released 1.n.0. This is done for greater convenience for people who want to test a newly stabilized feature on nightly. For users who wish to pin nightlies, this commit adds a -Z assume-incomplete-release option that they can enable if there are any issues due to this change.
2020-12-22Revert "Promote missing_fragment_specifier to hard error"Wesley Wiser-0/+2
This reverts commit 02eae432e7476a0686633a8c2b7cb1d5aab1bd2c.
2020-11-15Rollup merge of #79005 - petrochenkov:noinjected, r=davidtwcoJonas Schievink-3/+1
cleanup: Remove `ParseSess::injected_crate_name` Its only remaining use is in pretty-printing where the necessary information can be easily re-computed.
2020-11-13cleanup: Remove `ParseSess::injected_crate_name`Vadim Petrochenkov-3/+1
2020-11-07Allow making `RUSTC_BOOTSTRAP` conditional on the crate nameJoshua Nelson-1/+1
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-08-30mv compiler to compiler/mark-0/+239