Skip to content
Closed
Changes from all commits
Commits
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
7 changes: 6 additions & 1 deletion compiler/rustc_session/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ fn default_emitter(
#[allow(rustc::bad_opt_access)]
#[allow(rustc::untranslatable_diagnostic)] // FIXME: make this translatable
pub fn build_session(
sopts: config::Options,
mut sopts: config::Options,
io: CompilerIO,
fluent_bundle: Option<Arc<rustc_errors::FluentBundle>>,
registry: rustc_errors::registry::Registry,
Expand All @@ -1001,6 +1001,11 @@ pub fn build_session(
ice_file: Option<PathBuf>,
using_internal_features: &'static AtomicBool,
) -> Session {
match sopts.debuginfo {
DebugInfo::None | DebugInfo::LineDirectivesOnly | DebugInfo::LineTablesOnly => {}
DebugInfo::Limited | DebugInfo::Full => sopts.debuginfo = DebugInfo::LineTablesOnly,
}

// FIXME: This is not general enough to make the warning lint completely override
// normal diagnostic warnings, since the warning lint can also be denied and changed
// later via the source code.
Expand Down
Loading