diff options
| author | Eric Huss <eric@huss.org> | 2021-02-16 19:17:01 -0800 |
|---|---|---|
| committer | Eric Huss <eric@huss.org> | 2021-02-16 19:17:01 -0800 |
| commit | ee0e841a2e949cba1dcf3a2fb04e9a673681e4fd (patch) | |
| tree | 6da62d366bdefb57d202fa9a05baad12ab439de7 /src | |
| parent | a143517d44cac50b20cbd3a0b579addab40dd399 (diff) | |
| download | rust-ee0e841a2e949cba1dcf3a2fb04e9a673681e4fd.tar.gz rust-ee0e841a2e949cba1dcf3a2fb04e9a673681e4fd.zip | |
rustdoc: treat edition 2021 as unstable
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/config.rs | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/librustdoc/config.rs b/src/librustdoc/config.rs index 63a25e5dbfb..1478437cefa 100644 --- a/src/librustdoc/config.rs +++ b/src/librustdoc/config.rs @@ -16,7 +16,7 @@ use rustc_session::config::{CodegenOptions, DebuggingOptions, ErrorOutputType, E use rustc_session::getopts; use rustc_session::lint::Level; use rustc_session::search_paths::SearchPath; -use rustc_span::edition::{Edition, DEFAULT_EDITION}; +use rustc_span::edition::Edition; use rustc_target::spec::TargetTriple; use crate::core::new_handler; @@ -469,17 +469,7 @@ impl Options { } } - let edition = if let Some(e) = matches.opt_str("edition") { - match e.parse() { - Ok(e) => e, - Err(_) => { - diag.struct_err("could not parse edition").emit(); - return Err(1); - } - } - } else { - DEFAULT_EDITION - }; + let edition = config::parse_crate_edition(&matches); let mut id_map = html::markdown::IdMap::new(); id_map.populate(&html::render::INITIAL_IDS); |
