Skip to content

Commit

Permalink
Auto merge of rust-lang#123482 - WaffleLapkin:never-type-fallback-to-…
Browse files Browse the repository at this point in the history
…self, r=<try>

[experiment] Set never type fallback = `!`

r? ghost
cc `@traviscross`
  • Loading branch information
bors committed Apr 5, 2024
2 parents 385fa9d + 1868b33 commit 2d84f27
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compiler/rustc_hir_typeck/src/fn_ctxt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,11 @@ fn parse_never_type_options_attr(
}

let fallback = fallback.unwrap_or_else(|| {
if true {
// For a crater experiment, set `fallback = !`
return FallbackToNever;
}

if tcx.features().never_type_fallback { FallbackToNiko } else { FallbackToUnit }
});

Expand Down

0 comments on commit 2d84f27

Please sign in to comment.