Repository: rust-lang/rust-enhanced (language: rust)

Issue:
Remove -Z no-trans support?
The `-Z no-trans` option will be soon renamed to `-Z no-codegen` (see rust-lang/rust#50615).  There is still legacy support for the on-save checking to use this mode instead of `cargo check`.  I'd prefer just to remove support for `no-trans`, since I don't think there is a good reason to use it nowadays.  Alternatively, we can check the rustc version and use the new flag if anyone actually still wants it.

### Rust Enhanced Version
v2.11.0


Discussion / hints:
IMO there's no technical reason for using `-Zno-{trans,codegen}` instead of `cargo check`.

Fix patch:
diff --git a/.travis.yml b/.travis.yml
index 6f40676e..8f978867 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,54 +1,56 @@
 env:
-    global:
-        - PACKAGE="Rust Enhanced"
-        - SUBLIME_TEXT_VERSION="3"
+  global:
+    - PACKAGE="Rust Enhanced"
+    - SUBLIME_TEXT_VERSION="3"
 
 language: rust
 
-matrix:
-    include:
-        - os: linux
-          rust: stable
-
-        - os: osx
-          rust: stable
-
-        - os: linux
-          rust: beta
-
-        - os: osx
-          rust: beta
+os:
+  - linux
+  - osx
 
-        - os: linux
-          rust: nightly
-
-        - os: osx
-          rust: nightly
+rust:
+  - stable
+  - beta
+  - nightly
 
+matrix:
+  allow_failures:
+    - rust: beta
+    - rust: nightly
 
 before_install:
-    - curl -OL https://raw.githubusercontent.com/SublimeText/UnitTesting/master/sbin/travis.sh
+  - curl -OL https://raw.githubusercontent.com/SublimeText/UnitTesting/master/sbin/travis.sh
 
-    # enable gui, see https://docs.travis-ci.com/user/gui-and-headless-browsers
-    - if [ "$TRAVIS_OS_NAME" == "linux"  ]; then
-            export DISPLAY=:99.0;
-            sh -e /etc/init.d/xvfb start;
-      fi
+  # enable gui, see https://docs.travis-ci.com/user/gui-and-headless-browsers
+  - if [ "$TRAVIS_OS_NAME" == "linux" ]; then
+      export DISPLAY=:99.0;
+      sh -e /etc/init.d/xvfb start;
+    fi
 
 
 install:
-    # Install Sublime and Sublime Unittesting.
-    - sh travis.sh bootstrap
-    # Install Package Control, needed for dependencies.
-    - sh travis.sh install_package_control
-
-    # Ensure nightly is installed to run no-trans, benchmarks, and Clippy.
-    - rustup install nightly
-    # Install Rust packages needed by integration tests.
-    - cargo +nightly install clippy || export RE_SKIP_CLIPPY=1
-    - cargo install cargo-script
+  # Install Sublime and Sublime Unittesting.
+  - sh travis.sh bootstrap
+  # Install Package Control, needed for dependencies.
+  - sh travis.sh install_package_control
+
+  # Ensure nightly is installed to run benchmarks and Clippy.
+  # Pin a known good version of nightly and clippy.
+  - >
+    if [ "$TRAVIS_RUST_VERSION" != "nightly" ]; then
+      rustup install nightly-2018-05-26;
+      host=$(rustc -Vv | grep ^host: | sed -e "s/host: //g");
+      toolchains=$(dirname $(dirname $(dirname $(rustup which rustc))));
+      mv $toolchains/nightly-* $toolchains/nightly-$host;
+      cargo +nightly install --version 0.0.205 clippy || export RE_SKIP_CLIPPY=1;
+    else
+      cargo +nightly install clippy || export RE_SKIP_CLIPPY=1;
+    fi
+  # Install Rust packages needed by integration tests.
+  - cargo install cargo-script
 
 
 script:
-    - sh travis.sh run_syntax_tests
-    - sh travis.sh run_tests
+  - sh travis.sh run_syntax_tests
+  - sh travis.sh run_tests
diff --git a/README.md b/README.md
index 985f2818..fdbb72e9 100644
--- a/README.md
+++ b/README.md
@@ -61,14 +61,13 @@ This relies on Cargo and Rust (>= 1.8.0) being installed and on your system path
 | :------ | :------ | :---------- |
 | `rust_syntax_checking` | `true` | Enable the on-save syntax checking. |
 | `rust_syntax_checking_method` | `"check"` | The method used for checking your code (see below). |
-| `rust_syntax_checking_include_tests` | `true` | Enable checking of test code within `#[cfg(test)]` sections (only for `no-trans` method). |
+| `rust_syntax_checking_include_tests` | `true` | Enable checking of test code within `#[cfg(test)]` sections. |
 | `rust_syntax_hide_warnings` | `false` | Don't show warnings when syntax checking |
 
 The available checking methods are:
 
 | Method | Description |
 | :----- | :---------- |
-| `no-trans` | Runs the rustc compiler with the `-Zno-trans` option. This will be deprecated soon, however it has the benefit of supporting `#[test]` sections. |
 | `check` | Uses `cargo check` (requires at least Rust 1.16). |
 | `clippy` | Uses `cargo clippy`.  This requires [Clippy](https://github.com/Manishearth/rust-clippy) to be installed.  This also may be a little slower since it must check every target in your package. |
 
diff --git a/RustEnhanced.sublime-settings b/RustEnhanced.sublime-settings
index b030639e..1bbc9dc8 100644
--- a/RustEnhanced.sublime-settings
+++ b/RustEnhanced.sublime-settings
@@ -4,7 +4,7 @@
     "rust_syntax_checking": true,
 
     // The method used to check code on-save.
-    // "check", "no-trans", or "clippy" (see README.md)
+    // "check" or "clippy" (see README.md)
     "rust_syntax_checking_method": "check",
 
     // Enable checking of test code within #[cfg(test)] sections.
diff --git a/SyntaxCheckPlugin.py b/SyntaxCheckPlugin.py
index f34e86bc..52f96700 100755
--- a/SyntaxCheckPlugin.py
+++ b/SyntaxCheckPlugin.py
@@ -12,37 +12,6 @@
 whenever you save a Rust file.
 """
 
-# Notes:
-# - -Zno-trans has been deprecated, and will only be available with the
-#   nightly compiler starting with rust 1.19.  Using "cargo check" is the
-#   preferred alternative, though it currently has some limitations. See:
-#
-#       - Unstable flags removed:
-#         https://github.com/rust-lang/rust/issues/31847
-#
-#       - Cargo check added in rust 1.16:
-#         https://github.com/rust-lang/cargo/pull/3296 (based on original
-#         "cargo check" addon https://github.com/rsolomo/cargo-check/)
-#
-#       - RLS was recently released
-#         (https://github.com/rust-lang-nursery/rls).  It's unclear to me if
-#         this will perform full-linting that could replace this or not.
-#
-#       - "cargo check" ignores #[test]:
-#         https://github.com/rust-lang/cargo/issues/3431
-#
-#       - "cargo check" will not re-issue errors/warnings if nothing has
-#         changed.  This generally should not be a problem since on-save
-#         syntax only runs after the file has been saved which updates the
-#         timestamp, but it's something to be careful about.  See:
-#         https://github.com/rust-lang/cargo/issues/3624
-#
-# - -Zno-trans prevents some warnings and errors from being generated. For
-#   example, see const-err.rs.  "cargo check" does not have this problem.
-#   Other issues:
-#       - Errors generated by compiling an extern crate do not not output as
-#         json.
-
 
 class RustSyntaxCheckEvent(sublime_plugin.EventListener):
 
@@ -134,7 +103,15 @@ def get_rustc_messages(self):
             p.wait()
             return
 
-        # "no-trans" or "check" methods.
+        if method == 'no-trans':
+            print('rust_syntax_checking_method == "no-trans" is no longer supported.')
+            print('Please change the config setting to "check".')
+            method = 'check'
+
+        if method != 'check':
+            print('Unknown setting for `rust_syntax_checking_method`: %r' % (method,))
+            return
+
         td = target_detect.TargetDetector(self.window)
         targets = td.determine_targets(self.triggered_file_name)
         for (target_src, target_args) in targets:
@@ -142,20 +119,14 @@ def get_rustc_messages(self):
                 initial_settings={'target': ' '.join(target_args)},
                 force_json=True)
             self.msg_rel_path = cmd['msg_rel_path']
-            if method == 'no-trans':
-                cmd['command'].extend(['--', '-Zno-trans', '-Zunstable-options'])
-                if (util.get_setting('rust_syntax_checking_include_tests', True) and
-                    not ('--test' in target_args or '--bench' in target_args)):
-                    # Including the test harness has a few drawbacks.
-                    # missing_docs lint is disabled (see
-                    # https://github.com/rust-lang/sublime-rust/issues/156)
-                    # It also disables the "main function not found" error for
-                    # binaries.
-                    cmd['command'].append('--test')
-            elif method == 'check':
-                if (util.get_setting('rust_syntax_checking_include_tests', True) and
-                    semver.match(cmd['rustc_version'], '>=1.23.0')):
-                    cmd['command'].append('--profile=test')
+            if (util.get_setting('rust_syntax_checking_include_tests', True) and
+                semver.match(cmd['rustc_version'], '>=1.23.0')):
+                # Including the test harness has a few drawbacks.
+                # missing_docs lint is disabled (see
+                # https://github.com/rust-lang/sublime-rust/issues/156)
+                # It also disables the "main function not found" error for
+                # binaries.
+                cmd['command'].append('--profile=test')
             p = rust_proc.RustProc()
             self.current_target_src = target_src
             p.run(self.window, cmd['command'], self.cwd, self, env=cmd['env'])
diff --git a/appveyor.yml b/appveyor.yml
index c0fc6fdb..512fe8c8 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -18,7 +18,7 @@ install:
     - curl -sSf -o rustup-init.exe https://win.rustup.rs/
     - rustup-init.exe -y --default-toolchain %RUST_VERSION%
     - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
-    # Ensure nightly is installed to run no-trans, benchmarks, and Clippy.
+    # Ensure nightly is installed to run benchmarks and Clippy.
     - rustup install nightly
     # Install Rust packages needed by integration tests.
     - cargo +nightly install clippy || set RE_SKIP_CLIPPY=1
diff --git a/rust/cargo_config.py b/rust/cargo_config.py
index b5687380..4d82e2e3 100644
--- a/rust/cargo_config.py
+++ b/rust/cargo_config.py
@@ -278,9 +278,7 @@ def items_variant(self):
     def filter_variant(self, x):
         """Subclasses override this to filter variants from the variant
         list."""
-        # no-trans is a special, hidden, internal command. In theory, a user
-        # can configure it, but since it is deprecated, just hide it for now.
-        return x['name'] != 'no-trans'
+        return True
 
     def items_which(self):
         """Choice to select at which level the setting should be saved at."""
diff --git a/rust/cargo_settings.py b/rust/cargo_settings.py
index c6ab2ec3..d92ff0d9 100644
--- a/rust/cargo_settings.py
+++ b/rust/cargo_settings.py
@@ -110,18 +110,6 @@
         'requires_view_path': True,
         'requires_manifest': False,
     },
-    # This is a special command (not exposed) used by on-save syntax checking.
-    'no-trans': {
-        'name': 'no-trans',
-        'command': 'rustc',
-        'allows_target': True,
-        'allows_target_triple': True,
-        'allows_release': True,
-        'allows_features': True,
-        'allows_json': True,
-        'requires_view_path': False,
-        'requires_manifest': False,
-    }
 }
 
 
diff --git a/rust/target_detect.py b/rust/target_detect.py
index 904a9e4d..83f60d57 100644
--- a/rust/target_detect.py
+++ b/rust/target_detect.py
@@ -58,8 +58,6 @@ def determine_targets(self, file_name):
             if result:
                 return result
 
-        # TODO: Alternatively, could run rustc directly without cargo.
-        # rustc -Zno-trans -Zunstable-options --error-format=json file_name
         print('Rust Enhanced: Failed to find target for %r' % file_name)
         return []
 


Test patch:
diff --git a/tests/error-tests/examples/no_main.rs b/tests/error-tests/examples/no_main.rs
index e3195933..7fd459b0 100644
--- a/tests/error-tests/examples/no_main.rs
+++ b/tests/error-tests/examples/no_main.rs
@@ -1,9 +1,8 @@
 // Should display error about no main.
 
 mod no_main_mod;
-// Not sure why no-trans doesn't handle this properly.
 // When --profile=test is used with `cargo check`, this error will not happen
 // due to the synthesized main created by the test harness.
-// end-msg: ERR(rust_syntax_checking_include_tests=False OR <1.23.0,rust_syntax_checking_include_tests=True,check) /`?main`? function not found/
-// end-msg: NOTE(rust_syntax_checking_include_tests=False OR <1.23.0,rust_syntax_checking_include_tests=True,check) the main function must be defined
-// end-msg: MSG(rust_syntax_checking_include_tests=False OR <1.23.0,rust_syntax_checking_include_tests=True,check) See Also: no_main_mod.rs:4
+// end-msg: ERR(rust_syntax_checking_include_tests=False OR <1.23.0,rust_syntax_checking_include_tests=True) /`?main`? function not found/
+// end-msg: NOTE(rust_syntax_checking_include_tests=False OR <1.23.0,rust_syntax_checking_include_tests=True) the main function must be defined
+// end-msg: MSG(rust_syntax_checking_include_tests=False OR <1.23.0,rust_syntax_checking_include_tests=True) See Also: no_main_mod.rs:4
diff --git a/tests/error-tests/examples/no_main_mod.rs b/tests/error-tests/examples/no_main_mod.rs
index f84f355d..35f9f112 100644
--- a/tests/error-tests/examples/no_main_mod.rs
+++ b/tests/error-tests/examples/no_main_mod.rs
@@ -2,7 +2,5 @@
 //       ^^^^^^^^^WARN(>=1.23.0,rust_syntax_checking_include_tests=True) function is never used
 //       ^^^^^^^^^NOTE(>=1.23.0,rust_syntax_checking_include_tests=True) #[warn(dead_code)]
 }/*END*/
-// ~NOTE(rust_syntax_checking_include_tests=False OR <1.23.0,rust_syntax_checking_include_tests=True,check) here is a function named 'main'
-// ~MSG(rust_syntax_checking_include_tests=False OR <1.23.0,rust_syntax_checking_include_tests=True,check) See Primary: no_main.rs
-// ~WARN(<1.19.0,no-trans,rust_syntax_checking_include_tests=True) function is never used
-// ~NOTE(>=1.17.0,<1.19.0,no-trans,rust_syntax_checking_include_tests=True) #[warn(dead_code)]
+// ~NOTE(rust_syntax_checking_include_tests=False OR <1.23.0,rust_syntax_checking_include_tests=True) here is a function named 'main'
+// ~MSG(rust_syntax_checking_include_tests=False OR <1.23.0,rust_syntax_checking_include_tests=True) See Primary: no_main.rs
diff --git a/tests/error-tests/src/lib.rs b/tests/error-tests/src/lib.rs
index 0fd0ebcc..a64e26f1 100644
--- a/tests/error-tests/src/lib.rs
+++ b/tests/error-tests/src/lib.rs
@@ -4,8 +4,8 @@ mod tests {
 //            ^^^^^^^^^^^^ERR(<1.16.0,rust_syntax_checking_include_tests=True) type name
 //            ^^^^^^^^^^^^ERR(<1.16.0,rust_syntax_checking_include_tests=True) undefined or not in scope
 //            ^^^^^^^^^^^^HELP(<1.16.0,rust_syntax_checking_include_tests=True) no candidates
-//            ^^^^^^^^^^^^ERR(>=1.16.0,<1.19.0,rust_syntax_checking_include_tests=True,no-trans OR >=1.23.0,rust_syntax_checking_include_tests=True) cannot find type `DoesNotExist`
-//            ^^^^^^^^^^^^ERR(>=1.16.0,<1.19.0,rust_syntax_checking_include_tests=True,no-trans OR >=1.23.0,rust_syntax_checking_include_tests=True) not found in this scope
+//            ^^^^^^^^^^^^ERR(>=1.23.0,rust_syntax_checking_include_tests=True) cannot find type `DoesNotExist`
+//            ^^^^^^^^^^^^ERR(>=1.23.0,rust_syntax_checking_include_tests=True) not found in this scope
     }
 
     #[test]
@@ -13,7 +13,7 @@ mod tests {
         asdf
 //      ^^^^ERR(<1.16.0,rust_syntax_checking_include_tests=True) unresolved name
 //      ^^^^ERR(<1.16.0,rust_syntax_checking_include_tests=True) unresolved name
-//      ^^^^ERR(>=1.16.0,<1.19.0,rust_syntax_checking_include_tests=True,no-trans OR >=1.23.0,rust_syntax_checking_include_tests=True) cannot find value
-//      ^^^^ERR(>=1.16.0,<1.19.0,rust_syntax_checking_include_tests=True,no-trans OR >=1.23.0,rust_syntax_checking_include_tests=True) not found in this scope
+//      ^^^^ERR(>=1.23.0,rust_syntax_checking_include_tests=True) cannot find value
+//      ^^^^ERR(>=1.23.0,rust_syntax_checking_include_tests=True) not found in this scope
     }
 }
diff --git a/tests/error-tests/tests/const-err.rs b/tests/error-tests/tests/const-err.rs
deleted file mode 100644
index f51276ff..00000000
--- a/tests/error-tests/tests/const-err.rs
+++ /dev/null
@@ -1,56 +0,0 @@
-// This will not display errors/warnings with no-trans.
-
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// compile-flags: -Zforce-overflow-checks=on
-
-// these errors are not actually "const_err", they occur in trans/consts
-// and are unconditional warnings that can't be denied or allowed
-
-#![allow(exceeding_bitshifts)]
-#![allow(const_err)]
-
-fn black_box<T>(_: T) {
-    unimplemented!()
-}
-
-// Make sure that the two uses get two errors.
-const FOO: u8 = [5u8][1];
-//~^ ERROR constant evaluation error
-//~| index out of bounds: the len is 1 but the index is 1
-//~^^^ ERROR constant evaluation error
-//~| index out of bounds: the len is 1 but the index is 1
-
-fn main() {
-    let a = -std::i8::MIN;
-    //~^ WARN this expression will panic at run-time
-    //~| attempt to negate with overflow
-    let b = 200u8 + 200u8 + 200u8;
-    //~^ WARN this expression will panic at run-time
-    //~| attempt to add with overflow
-    //~^^^ WARN this expression will panic at run-time
-    //~| attempt to add with overflow
-    let c = 200u8 * 4;
-    //~^ WARN this expression will panic at run-time
-    //~| attempt to multiply with overflow
-    let d = 42u8 - (42u8 + 1);
-    //~^ WARN this expression will panic at run-time
-    //~| attempt to subtract with overflow
-    let _e = [5u8][1];
-    //~^ WARN this expression will panic at run-time
-    //~| index out of bounds: the len is 1 but the index is 1
-    black_box(a);
-    black_box(b);
-    black_box(c);
-    black_box(d);
-
-    black_box((FOO, FOO));
-}
diff --git a/tests/error-tests/tests/macro-expansion-outside-1.rs b/tests/error-tests/tests/macro-expansion-outside-1.rs
index 5254f8c8..14c32a7c 100644
--- a/tests/error-tests/tests/macro-expansion-outside-1.rs
+++ b/tests/error-tests/tests/macro-expansion-outside-1.rs
@@ -15,16 +15,16 @@ extern crate dcrate;
 // ~ERR(>=1.20.0) this error originates in a macro outside of the current crate
 // ~ERR(>=1.20.0) expected one of
 // ~ERR(>=1.20.0,<1.24.0-beta) unexpected token
-// end-msg: ERR(check,>=1.19.0,<1.20.0-beta) /expected one of .*, found `:`/
-// end-msg: ERR(check,>=1.19.0,<1.20.0-beta) Errors occurred in macro <example_bad_syntax macros> from external crate
-// end-msg: ERR(check,>=1.19.0,<1.20.0-beta) Macro text: (  ) => { enum E { Kind ( x : u32 ) } }
-// end-msg: ERR(check,>=1.19.0,<1.20.0-beta) /expected one of .* here/
-// end-msg: ERR(check,>=1.19.0,<1.20.0-beta) unexpected token
-// end-msg: ERR(check,>=1.19.0,<1.20.0-beta) /expected one of .*, found `:`/
-// end-msg: ERR(check,>=1.19.0,<1.20.0-beta) Errors occurred in macro <example_bad_syntax macros> from external crate
-// end-msg: ERR(check,>=1.19.0,<1.20.0-beta) Macro text: (  ) => { enum E { Kind ( x : u32 ) } }
-// end-msg: ERR(check,>=1.19.0,<1.20.0-beta) expected one of 7 possible tokens here
-// end-msg: ERR(check,>=1.19.0,<1.20.0-beta) unexpected token
+// end-msg: ERR(>=1.19.0,<1.20.0-beta) /expected one of .*, found `:`/
+// end-msg: ERR(>=1.19.0,<1.20.0-beta) Errors occurred in macro <example_bad_syntax macros> from external crate
+// end-msg: ERR(>=1.19.0,<1.20.0-beta) Macro text: (  ) => { enum E { Kind ( x : u32 ) } }
+// end-msg: ERR(>=1.19.0,<1.20.0-beta) /expected one of .* here/
+// end-msg: ERR(>=1.19.0,<1.20.0-beta) unexpected token
+// end-msg: ERR(>=1.19.0,<1.20.0-beta) /expected one of .*, found `:`/
+// end-msg: ERR(>=1.19.0,<1.20.0-beta) Errors occurred in macro <example_bad_syntax macros> from external crate
+// end-msg: ERR(>=1.19.0,<1.20.0-beta) Macro text: (  ) => { enum E { Kind ( x : u32 ) } }
+// end-msg: ERR(>=1.19.0,<1.20.0-beta) expected one of 7 possible tokens here
+// end-msg: ERR(>=1.19.0,<1.20.0-beta) unexpected token
 // end-msg: ERR(<1.19.0) /expected one of .*, found `:`/
 // end-msg: ERR(<1.19.0) Errors occurred in macro <example_bad_syntax macros> from external crate
 // end-msg: ERR(<1.19.0) Macro text: (  ) => { enum E { Kind ( x : u32 ) } }
diff --git a/tests/test_cargo_build.py b/tests/test_cargo_build.py
index d3dbf5c0..f608fde2 100644
--- a/tests/test_cargo_build.py
+++ b/tests/test_cargo_build.py
@@ -80,10 +80,11 @@ def _test_build_with_target(self, view):
                 'libmulti_targets.rlib']),
             ('--bin otherbin', [
                 exe('otherbin'),
-                'libmulti_targets.rlib']),
+                # Changed by https://github.com/rust-lang/cargo/pull/5460
+                version('libmulti_targets.rlib', '<1.28.0-beta')]),
             ('--bin multi-targets', [
                 exe('multi-targets'),
-                'libmulti_targets.rlib']),
+                version('libmulti_targets.rlib', '<1.28.0-beta')]),
             ('--lib', [
                 'libmulti_targets.rlib']),
             # Not clear to me why it produces ex1-* files.
@@ -98,7 +99,7 @@ def _test_build_with_target(self, view):
                 exe('otherbin'),
                 exe('feats'),
                 exe('penv'),
-                'libmulti_targets.rlib',
+                version('libmulti_targets.rlib', '<1.28.0-beta'),
                 'test1-*']),
             # bench requires nightly
         ]
diff --git a/tests/test_message_order.py b/tests/test_message_order.py
index d55880e3..8cf8deef 100644
--- a/tests/test_message_order.py
+++ b/tests/test_message_order.py
@@ -11,8 +11,8 @@ def setUp(self):
         super(TestMessageOrder, self).setUp()
         # Set a base version for these tests.
         version = util.get_rustc_version(sublime.active_window(), plugin_path)
-        if semver.match(version, '<1.18.0'):
-            self.skipTest('Tests require rust 1.18 or newer.')
+        if semver.match(version, '<1.20.0'):
+            self.skipTest('Tests require rust 1.20 or newer.')
 
         # Make it so that the build target is automatically determined from
         # the active view so each test doesn't have to specify it.
diff --git a/tests/test_syntax_check.py b/tests/test_syntax_check.py
index ea44735f..d634d402 100755
--- a/tests/test_syntax_check.py
+++ b/tests/test_syntax_check.py
@@ -64,8 +64,6 @@ def test_messages(self):
 
         The current restrictions are:
 
-        - `no-trans`: This message only appears with no-trans method.
-        - `check`: This message only appears with check method.
         - semver: Any semver string to match against the rustc version.
         - `key=value`: Check a configuration value.
 
@@ -88,8 +86,6 @@ def test_messages(self):
             'error-tests/tests/arg-count-mismatch.rs',
             # "children" with spans
             'error-tests/tests/binop-mul-bool.rs',
-            # This is currently broken (-Zno-trans does not produce errors).
-            # 'error-tests/tests/const-err.rs',
             # Macro-expansion test.
             'error-tests/tests/dead-code-ret.rs',
             # "code" test
@@ -122,24 +118,13 @@ def test_messages(self):
             'workspace/workspace2/src/somemod.rs',
         ]
 
+        if semver.match(self.rustc_version, '<1.19.0'):
+            self.skipTest('Tests require rust 1.19 or newer.')
+
         # Configure different permutations of settings to test for each file.
-        methods = ['no-trans']
-        if semver.match(self.rustc_version, '>=1.16.0'):
-            methods.append('check')
-        else:
-            print('Skipping check, need rust >= 1.16.')
+        methods = ['check']
         setups = [_altered_settings('rust_syntax_checking_method', methods)]
 
-        if semver.match(self.rustc_version, '>=1.19.0'):
-            # -Zno-trans now requires nightly
-            self._override_setting('cargo_build', {
-                'variants': {
-                    'no-trans': {
-                        'toolchain': 'nightly'
-                    }
-                }
-            })
-
         for paths in to_test:
             if not isinstance(paths, tuple):
                 paths = (paths,)
@@ -298,13 +283,7 @@ def _filter_expected_messages(self, view, expected_messages):
             toolchain=toolchain)
 
         def do_check(check):
-            if check == 'check':
-                # This message only shows up in check.
-                return method == 'check'
-            elif check == 'no-trans':
-                # This message only shows up in no-trans.
-                return method == 'no-trans'
-            elif check == 'nightly':
+            if check == 'nightly':
                 # This message only shows on nightly.
                 return 'nightly' in self.rustc_version
             elif re.match('[<>=!0-9]', check):