Skip to content

Commit 105f4b8

Browse files
authoredNov 10, 2020
Rollup merge of #78875 - petrochenkov:cleantarg, r=Mark-Simulacrum
rustc_target: Further cleanup use of target options Follow up to #77729. Implements items 2 and 4 from the list in #77729 (comment). The first commit collapses uses of `target.options.foo` into `target.foo`. The second commit renames some target options to avoid tautology: `target.target_endian` -> `target.endian` `target.target_c_int_width` -> `target.c_int_width` `target.target_os` -> `target.os` `target.target_env` -> `target.env` `target.target_vendor` -> `target.vendor` `target.target_family` -> `target.os_family` `target.target_mcount` -> `target.mcount` r? `@Mark-Simulacrum`
2 parents e15fee9 + 7f91175 commit 105f4b8

File tree

153 files changed

+453
-503
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+453
-503
lines changed
 

‎compiler/rustc_ast_passes/src/ast_validation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ impl<'a> Visitor<'a> for AstValidator<'a> {
796796

797797
fn visit_expr(&mut self, expr: &'a Expr) {
798798
match &expr.kind {
799-
ExprKind::LlvmInlineAsm(..) if !self.session.target.options.allow_asm => {
799+
ExprKind::LlvmInlineAsm(..) if !self.session.target.allow_asm => {
800800
struct_span_err!(
801801
self.session,
802802
expr.span,

‎compiler/rustc_builtin_macros/src/test_harness.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct TestCtxt<'a> {
3737
pub fn inject(sess: &Session, resolver: &mut dyn ResolverExpand, krate: &mut ast::Crate) {
3838
let span_diagnostic = sess.diagnostic();
3939
let panic_strategy = sess.panic_strategy();
40-
let platform_panic_strategy = sess.target.options.panic_strategy;
40+
let platform_panic_strategy = sess.target.panic_strategy;
4141

4242
// Check for #![reexport_test_harness_main = "some_name"] which gives the
4343
// main test function the name `some_name` without hygiene. This needs to be

0 commit comments

Comments
 (0)