]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #48309 - mark-i-m:anon_param_lint, r=nikomatsakis
authorbors <bors@rust-lang.org>
Sun, 27 May 2018 22:28:11 +0000 (22:28 +0000)
committerbors <bors@rust-lang.org>
Sun, 27 May 2018 22:28:11 +0000 (22:28 +0000)
Make anon params lint warn-by-default

This is intended as a followup on anonymous parameters deprecation.

Cross-posting from #41686:

> After having read a bit more of the discussion that I can find, I propose a more aggressive deprecation strategy:
> - We make the lint warn-by-default as soon as possible
> - We make anon parameters a hard error at the epoch boundary

cc @matklad @est31 @aturon

src/Cargo.lock
src/test/compile-fail/issue-51022.rs [deleted file]
src/test/ui/issue-51022.rs [new file with mode: 0644]
src/test/ui/issue-51022.stderr [new file with mode: 0644]
src/tools/cargo

index 83e061d20bdaa0ec4bf8fcf2c7f5806957e33966..7325445b947b7de48d73088fb63c2a6e0d11cf4e 100644 (file)
@@ -195,7 +195,7 @@ dependencies = [
  "atty 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "bufstream 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-foundation 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "crates-io 0.17.0",
  "crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "crypto-hash 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -457,20 +457,17 @@ dependencies = [
 
 [[package]]
 name = "core-foundation"
-version = "0.5.1"
+version = "0.6.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "core-foundation-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "core-foundation-sys"
-version = "0.5.1"
+version = "0.6.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
-]
 
 [[package]]
 name = "crates-io"
@@ -3040,8 +3037,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 "checksum commoncrypto 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d056a8586ba25a1e4d61cb090900e495952c7886786fc55f909ab2f819b69007"
 "checksum commoncrypto-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1fed34f46747aa73dfaa578069fd8279d2818ade2b55f38f22a9401c7f4083e2"
 "checksum compiletest_rs 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "608d9d3ccc45b63bf337d2ff5e65def5a5a52c187122232509f6b72707f61b1b"
-"checksum core-foundation 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "286e0b41c3a20da26536c6000a280585d519fd07b3956b43aed8a79e9edce980"
-"checksum core-foundation-sys 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "716c271e8613ace48344f723b60b900a93150271e5be206212d052bbc0883efa"
+"checksum core-foundation 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c7caa6cb9e76ddddbea09a03266d6b3bc98cd41e9fb9b017c473e7cca593ec25"
+"checksum core-foundation-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b2a53cce0ddcf7e7e1f998738d757d5a3bf08bf799a180e50ebe50d298f52f5a"
 "checksum crossbeam 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "24ce9782d4d5c53674646a6a4c1863a21a8fc0cb649b3c94dfc16e45071dea19"
 "checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3"
 "checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150"
diff --git a/src/test/compile-fail/issue-51022.rs b/src/test/compile-fail/issue-51022.rs
deleted file mode 100644 (file)
index d4d2192..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2018 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.
-
-// error-pattern: `main` function is not allowed to have lifetime parameters
-fn main<'a>() { }
diff --git a/src/test/ui/issue-51022.rs b/src/test/ui/issue-51022.rs
new file mode 100644 (file)
index 0000000..f9486fa
--- /dev/null
@@ -0,0 +1,12 @@
+// Copyright 2018 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.
+
+fn main<'a>() { }
+    //~^ ERROR `main` function is not allowed to have lifetime parameters [E0131]
diff --git a/src/test/ui/issue-51022.stderr b/src/test/ui/issue-51022.stderr
new file mode 100644 (file)
index 0000000..3b691bb
--- /dev/null
@@ -0,0 +1,9 @@
+error[E0131]: `main` function is not allowed to have lifetime parameters
+  --> $DIR/issue-51022.rs:11:8
+   |
+LL | fn main<'a>() { }
+   |        ^^^^ `main` cannot have lifetime parameters
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0131`.
index f352115d534ebdc8ec331209107f91a4f62da2e7..4c8b8ac1e7f2adf16bd90fa6da2b6a21f8e6cd4c 160000 (submodule)
@@ -1 +1 @@
-Subproject commit f352115d534ebdc8ec331209107f91a4f62da2e7
+Subproject commit 4c8b8ac1e7f2adf16bd90fa6da2b6a21f8e6cd4c