diff --git a/.github/ISSUE_TEMPLATE/library_tracking_issue.md b/.github/ISSUE_TEMPLATE/library_tracking_issue.md
index b8544e6a4e0fd..3e42594c8280d 100644
--- a/.github/ISSUE_TEMPLATE/library_tracking_issue.md
+++ b/.github/ISSUE_TEMPLATE/library_tracking_issue.md
@@ -2,7 +2,7 @@
name: Library Tracking Issue
about: A tracking issue for an unstable library feature.
title: Tracking Issue for XXX
-labels: C-tracking-issue T-libs
+labels: C-tracking-issue, T-libs
---
+
+
+doctest.main - Coverage Spans
+
+
+
+@0⦊fn main() ⦉@0{
+ if @0⦊true⦉@0 {
+ @5⦊@4,6,7,8,9⦊assert_eq!(1, 1);⦉@4,6,7,8,9⦉@5
+ } else {
+ @11⦊@10,12,13,14,15⦊assert_eq!(1, 2);⦉@10,12,13,14,15⦉@11
+ }
+}@16⦊‸⦉@16
+
+
diff --git a/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.doctest_crate/doctest_crate.fn_run_in_doctests.-------.InstrumentCoverage.0.html b/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.doctest_crate/doctest_crate.fn_run_in_doctests.-------.InstrumentCoverage.0.html
new file mode 100644
index 0000000000000..ae119d9ca9f2e
--- /dev/null
+++ b/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.doctest_crate/doctest_crate.fn_run_in_doctests.-------.InstrumentCoverage.0.html
@@ -0,0 +1,173 @@
+
+
+
+
+doctest_crate.fn_run_in_doctests - Coverage Spans
+
+
+
+@0⦊pub fn fn_run_in_doctests(conditional: usize) ⦉@0{
+ match @0⦊conditional⦉@0 {
+ 1 => @7⦊@6,8,9,10,11⦊assert_eq!(1, 1)⦉@6,8,9,10,11⦉@7, // this is run,
+ 2 => @14⦊@13,15,16,17,18⦊assert_eq!(1, 1)⦉@13,15,16,17,18⦉@14, // this,
+ 3 => @21⦊@20,22,23,24,25⦊assert_eq!(1, 1)⦉@20,22,23,24,25⦉@21, // and this too
+ _ => @27⦊@26,28,29,30,31⦊assert_eq!(1, 2)⦉@26,28,29,30,31⦉@27, // however this is not
+ }
+}@32⦊‸⦉@32
+
+
diff --git a/src/test/run-make-fulldeps/coverage/compiletest-ignore-dir b/src/test/run-make-fulldeps/coverage/compiletest-ignore-dir
index abf8df8fdc9e6..d1824d189e382 100644
--- a/src/test/run-make-fulldeps/coverage/compiletest-ignore-dir
+++ b/src/test/run-make-fulldeps/coverage/compiletest-ignore-dir
@@ -1,3 +1,3 @@
-# Directory "instrument-coverage" supports the tests at prefix ../instrument-coverage-*
+# Directory "coverage" supports the tests at prefix ../coverage-*
-# Use ./x.py [options] test src/test/run-make-fulldeps/instrument-coverage to run all related tests.
+# Use ./x.py [options] test src/test/run-make-fulldeps/coverage to run all related tests.
diff --git a/src/test/run-make-fulldeps/coverage/coverage_tools.mk b/src/test/run-make-fulldeps/coverage/coverage_tools.mk
index 7dc485cd94d66..4d340d4b1dadd 100644
--- a/src/test/run-make-fulldeps/coverage/coverage_tools.mk
+++ b/src/test/run-make-fulldeps/coverage/coverage_tools.mk
@@ -1,7 +1,7 @@
-# Common Makefile include for Rust `run-make-fulldeps/instrument-coverage-* tests. Include this
+# Common Makefile include for Rust `run-make-fulldeps/coverage-* tests. Include this
# file with the line:
#
-# -include ../instrument-coverage/coverage_tools.mk
+# -include ../coverage/coverage_tools.mk
-include ../tools.mk
diff --git a/src/test/run-make-fulldeps/coverage/doctest.rs b/src/test/run-make-fulldeps/coverage/doctest.rs
new file mode 100644
index 0000000000000..e41d669bf0c76
--- /dev/null
+++ b/src/test/run-make-fulldeps/coverage/doctest.rs
@@ -0,0 +1,66 @@
+//! This test ensures that code from doctests is properly re-mapped.
+//! See for more info.
+//!
+//! Just some random code:
+//! ```
+//! if true {
+//! // this is executed!
+//! assert_eq!(1, 1);
+//! } else {
+//! // this is not!
+//! assert_eq!(1, 2);
+//! }
+//! ```
+//!
+//! doctest testing external code:
+//! ```
+//! extern crate doctest_crate;
+//! doctest_crate::fn_run_in_doctests(1);
+//! ```
+//!
+//! doctest returning a result:
+//! ```
+//! #[derive(Debug)]
+//! struct SomeError;
+//! let mut res = Err(SomeError);
+//! if res.is_ok() {
+//! res?;
+//! } else {
+//! res = Ok(0);
+//! }
+//! // need to be explicit because rustdoc cant infer the return type
+//! Ok::<(), SomeError>(())
+//! ```
+//!
+//! doctest with custom main:
+//! ```
+//! #[derive(Debug)]
+//! struct SomeError;
+//!
+//! extern crate doctest_crate;
+//!
+//! fn doctest_main() -> Result<(), SomeError> {
+//! doctest_crate::fn_run_in_doctests(2);
+//! Ok(())
+//! }
+//!
+//! // this `main` is not shown as covered, as it clashes with all the other
+//! // `main` functions that were automatically generated for doctests
+//! fn main() -> Result<(), SomeError> {
+//! doctest_main()
+//! }
+//! ```
+
+/// doctest attached to fn testing external code:
+/// ```
+/// extern crate doctest_crate;
+/// doctest_crate::fn_run_in_doctests(3);
+/// ```
+///
+fn main() {
+ if true {
+ assert_eq!(1, 1);
+ } else {
+ assert_eq!(1, 2);
+ }
+}
diff --git a/src/test/run-make-fulldeps/coverage/lib/doctest_crate.rs b/src/test/run-make-fulldeps/coverage/lib/doctest_crate.rs
new file mode 100644
index 0000000000000..c3210146d69b0
--- /dev/null
+++ b/src/test/run-make-fulldeps/coverage/lib/doctest_crate.rs
@@ -0,0 +1,9 @@
+/// A function run only from within doctests
+pub fn fn_run_in_doctests(conditional: usize) {
+ match conditional {
+ 1 => assert_eq!(1, 1), // this is run,
+ 2 => assert_eq!(1, 1), // this,
+ 3 => assert_eq!(1, 1), // and this too
+ _ => assert_eq!(1, 2), // however this is not
+ }
+}
diff --git a/src/test/rustdoc-ui/reference-link-has-one-warning.rs b/src/test/rustdoc-ui/reference-link-has-one-warning.rs
deleted file mode 100644
index 21cb7eb9040bd..0000000000000
--- a/src/test/rustdoc-ui/reference-link-has-one-warning.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-// ignore-test
-// check-pass
-
-/// docs [label][with#anchor#error]
-//~^ WARNING has an issue with the link anchor
-pub struct S;
diff --git a/src/test/rustdoc-ui/reference-link-has-one-warning.stderr b/src/test/rustdoc-ui/reference-link-has-one-warning.stderr
deleted file mode 100644
index a1eeb60f1785a..0000000000000
--- a/src/test/rustdoc-ui/reference-link-has-one-warning.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-warning: `[with#anchor#error]` has an issue with the link anchor.
- --> $DIR/reference-link-has-one-warning.rs:3:18
- |
-LL | /// docs [label][with#anchor#error]
- | ^^^^^^^^^^^^^^^^^ only one `#` is allowed in a link
- |
- = note: `#[warn(broken_intra_doc_links)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/src/test/ui/array-slice-vec/box-of-array-of-drop-1.rs b/src/test/ui/array-slice-vec/box-of-array-of-drop-1.rs
index d485893281562..c8559d2472824 100644
--- a/src/test/ui/array-slice-vec/box-of-array-of-drop-1.rs
+++ b/src/test/ui/array-slice-vec/box-of-array-of-drop-1.rs
@@ -17,7 +17,12 @@ impl Drop for D {
fn drop(&mut self) {
println!("Dropping {}", self.0);
let old = LOG.load(Ordering::SeqCst);
- LOG.compare_and_swap(old, old << 4 | self.0 as usize, Ordering::SeqCst);
+ let _ = LOG.compare_exchange(
+ old,
+ old << 4 | self.0 as usize,
+ Ordering::SeqCst,
+ Ordering::SeqCst
+ );
}
}
diff --git a/src/test/ui/array-slice-vec/box-of-array-of-drop-2.rs b/src/test/ui/array-slice-vec/box-of-array-of-drop-2.rs
index e8a5b00a55b9c..e75051caabcc3 100644
--- a/src/test/ui/array-slice-vec/box-of-array-of-drop-2.rs
+++ b/src/test/ui/array-slice-vec/box-of-array-of-drop-2.rs
@@ -17,7 +17,12 @@ impl Drop for D {
fn drop(&mut self) {
println!("Dropping {}", self.0);
let old = LOG.load(Ordering::SeqCst);
- LOG.compare_and_swap(old, old << 4 | self.0 as usize, Ordering::SeqCst);
+ let _ = LOG.compare_exchange(
+ old,
+ old << 4 | self.0 as usize,
+ Ordering::SeqCst,
+ Ordering::SeqCst
+ );
}
}
diff --git a/src/test/ui/array-slice-vec/nested-vec-3.rs b/src/test/ui/array-slice-vec/nested-vec-3.rs
index 52b892dbcdfaf..96497a53d308e 100644
--- a/src/test/ui/array-slice-vec/nested-vec-3.rs
+++ b/src/test/ui/array-slice-vec/nested-vec-3.rs
@@ -18,7 +18,12 @@ impl Drop for D {
fn drop(&mut self) {
println!("Dropping {}", self.0);
let old = LOG.load(Ordering::SeqCst);
- LOG.compare_and_swap(old, old << 4 | self.0 as usize, Ordering::SeqCst);
+ let _ = LOG.compare_exchange(
+ old,
+ old << 4 | self.0 as usize,
+ Ordering::SeqCst,
+ Ordering::SeqCst,
+ );
}
}
diff --git a/src/test/ui/issues/issue-21475.rs b/src/test/ui/issues/issue-21475.rs
index ab0a18869632a..b028fcae0775b 100644
--- a/src/test/ui/issues/issue-21475.rs
+++ b/src/test/ui/issues/issue-21475.rs
@@ -1,5 +1,5 @@
// run-pass
-#![allow(unused_imports, overlapping_patterns)]
+#![allow(unused_imports, overlapping_range_endpoints)]
// pretty-expanded FIXME #23616
use m::{START, END};
diff --git a/src/test/ui/issues/issue-26251.rs b/src/test/ui/issues/issue-26251.rs
index edb06fea8ad53..a3e26a41232c7 100644
--- a/src/test/ui/issues/issue-26251.rs
+++ b/src/test/ui/issues/issue-26251.rs
@@ -1,5 +1,5 @@
// run-pass
-#![allow(overlapping_patterns)]
+#![allow(overlapping_range_endpoints)]
fn main() {
let x = 'a';
diff --git a/src/test/ui/parser/incorrect-move-async-order-issue-79694.fixed b/src/test/ui/parser/incorrect-move-async-order-issue-79694.fixed
new file mode 100644
index 0000000000000..055800d23b6c6
--- /dev/null
+++ b/src/test/ui/parser/incorrect-move-async-order-issue-79694.fixed
@@ -0,0 +1,8 @@
+// run-rustfix
+// edition:2018
+
+// Regression test for issue 79694
+
+fn main() {
+ let _ = async move { }; //~ ERROR 7:13: 7:23: the order of `move` and `async` is incorrect
+}
diff --git a/src/test/ui/parser/incorrect-move-async-order-issue-79694.rs b/src/test/ui/parser/incorrect-move-async-order-issue-79694.rs
new file mode 100644
index 0000000000000..e8be16516d6d3
--- /dev/null
+++ b/src/test/ui/parser/incorrect-move-async-order-issue-79694.rs
@@ -0,0 +1,8 @@
+// run-rustfix
+// edition:2018
+
+// Regression test for issue 79694
+
+fn main() {
+ let _ = move async { }; //~ ERROR 7:13: 7:23: the order of `move` and `async` is incorrect
+}
diff --git a/src/test/ui/parser/incorrect-move-async-order-issue-79694.stderr b/src/test/ui/parser/incorrect-move-async-order-issue-79694.stderr
new file mode 100644
index 0000000000000..2add9fb33c70e
--- /dev/null
+++ b/src/test/ui/parser/incorrect-move-async-order-issue-79694.stderr
@@ -0,0 +1,13 @@
+error: the order of `move` and `async` is incorrect
+ --> $DIR/incorrect-move-async-order-issue-79694.rs:7:13
+ |
+LL | let _ = move async { };
+ | ^^^^^^^^^^
+ |
+help: try switching the order
+ |
+LL | let _ = async move { };
+ | ^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/pattern/usefulness/integer-ranges/exhaustiveness.rs b/src/test/ui/pattern/usefulness/integer-ranges/exhaustiveness.rs
index 5a44dfc28bb45..ef573db821046 100644
--- a/src/test/ui/pattern/usefulness/integer-ranges/exhaustiveness.rs
+++ b/src/test/ui/pattern/usefulness/integer-ranges/exhaustiveness.rs
@@ -1,5 +1,6 @@
#![feature(exclusive_range_pattern)]
#![feature(assoc_char_consts)]
+#![allow(overlapping_range_endpoints)]
#![deny(unreachable_patterns)]
macro_rules! m {
diff --git a/src/test/ui/pattern/usefulness/integer-ranges/exhaustiveness.stderr b/src/test/ui/pattern/usefulness/integer-ranges/exhaustiveness.stderr
index 2e0023348e4d8..b1440375494b1 100644
--- a/src/test/ui/pattern/usefulness/integer-ranges/exhaustiveness.stderr
+++ b/src/test/ui/pattern/usefulness/integer-ranges/exhaustiveness.stderr
@@ -1,5 +1,5 @@
error[E0004]: non-exhaustive patterns: `u8::MAX` not covered
- --> $DIR/exhaustiveness.rs:47:8
+ --> $DIR/exhaustiveness.rs:48:8
|
LL | m!(0u8, 0..255);
| ^^^ pattern `u8::MAX` not covered
@@ -8,7 +8,7 @@ LL | m!(0u8, 0..255);
= note: the matched value is of type `u8`
error[E0004]: non-exhaustive patterns: `u8::MAX` not covered
- --> $DIR/exhaustiveness.rs:48:8
+ --> $DIR/exhaustiveness.rs:49:8
|
LL | m!(0u8, 0..=254);
| ^^^ pattern `u8::MAX` not covered
@@ -17,7 +17,7 @@ LL | m!(0u8, 0..=254);
= note: the matched value is of type `u8`
error[E0004]: non-exhaustive patterns: `0_u8` not covered
- --> $DIR/exhaustiveness.rs:49:8
+ --> $DIR/exhaustiveness.rs:50:8
|
LL | m!(0u8, 1..=255);
| ^^^ pattern `0_u8` not covered
@@ -26,7 +26,7 @@ LL | m!(0u8, 1..=255);
= note: the matched value is of type `u8`
error[E0004]: non-exhaustive patterns: `42_u8` not covered
- --> $DIR/exhaustiveness.rs:50:8
+ --> $DIR/exhaustiveness.rs:51:8
|
LL | m!(0u8, 0..42 | 43..=255);
| ^^^ pattern `42_u8` not covered
@@ -35,7 +35,7 @@ LL | m!(0u8, 0..42 | 43..=255);
= note: the matched value is of type `u8`
error[E0004]: non-exhaustive patterns: `i8::MAX` not covered
- --> $DIR/exhaustiveness.rs:51:8
+ --> $DIR/exhaustiveness.rs:52:8
|
LL | m!(0i8, -128..127);
| ^^^ pattern `i8::MAX` not covered
@@ -44,7 +44,7 @@ LL | m!(0i8, -128..127);
= note: the matched value is of type `i8`
error[E0004]: non-exhaustive patterns: `i8::MAX` not covered
- --> $DIR/exhaustiveness.rs:52:8
+ --> $DIR/exhaustiveness.rs:53:8
|
LL | m!(0i8, -128..=126);
| ^^^ pattern `i8::MAX` not covered
@@ -53,7 +53,7 @@ LL | m!(0i8, -128..=126);
= note: the matched value is of type `i8`
error[E0004]: non-exhaustive patterns: `i8::MIN` not covered
- --> $DIR/exhaustiveness.rs:53:8
+ --> $DIR/exhaustiveness.rs:54:8
|
LL | m!(0i8, -127..=127);
| ^^^ pattern `i8::MIN` not covered
@@ -62,7 +62,7 @@ LL | m!(0i8, -127..=127);
= note: the matched value is of type `i8`
error[E0004]: non-exhaustive patterns: `0_i8` not covered
- --> $DIR/exhaustiveness.rs:54:11
+ --> $DIR/exhaustiveness.rs:55:11
|
LL | match 0i8 {
| ^^^ pattern `0_i8` not covered
@@ -71,7 +71,7 @@ LL | match 0i8 {
= note: the matched value is of type `i8`
error[E0004]: non-exhaustive patterns: `u128::MAX` not covered
- --> $DIR/exhaustiveness.rs:59:8
+ --> $DIR/exhaustiveness.rs:60:8
|
LL | m!(0u128, 0..=ALMOST_MAX);
| ^^^^^ pattern `u128::MAX` not covered
@@ -80,7 +80,7 @@ LL | m!(0u128, 0..=ALMOST_MAX);
= note: the matched value is of type `u128`
error[E0004]: non-exhaustive patterns: `5_u128..=u128::MAX` not covered
- --> $DIR/exhaustiveness.rs:60:8
+ --> $DIR/exhaustiveness.rs:61:8
|
LL | m!(0u128, 0..=4);
| ^^^^^ pattern `5_u128..=u128::MAX` not covered
@@ -89,7 +89,7 @@ LL | m!(0u128, 0..=4);
= note: the matched value is of type `u128`
error[E0004]: non-exhaustive patterns: `0_u128` not covered
- --> $DIR/exhaustiveness.rs:61:8
+ --> $DIR/exhaustiveness.rs:62:8
|
LL | m!(0u128, 1..=u128::MAX);
| ^^^^^ pattern `0_u128` not covered
@@ -98,7 +98,7 @@ LL | m!(0u128, 1..=u128::MAX);
= note: the matched value is of type `u128`
error[E0004]: non-exhaustive patterns: `(126_u8..=127_u8, false)` not covered
- --> $DIR/exhaustiveness.rs:69:11
+ --> $DIR/exhaustiveness.rs:70:11
|
LL | match (0u8, true) {
| ^^^^^^^^^^^ pattern `(126_u8..=127_u8, false)` not covered
diff --git a/src/test/ui/pattern/usefulness/integer-ranges/overlapping_range_endpoints.rs b/src/test/ui/pattern/usefulness/integer-ranges/overlapping_range_endpoints.rs
index af720a0569322..5ea92b07081af 100644
--- a/src/test/ui/pattern/usefulness/integer-ranges/overlapping_range_endpoints.rs
+++ b/src/test/ui/pattern/usefulness/integer-ranges/overlapping_range_endpoints.rs
@@ -1,5 +1,5 @@
#![feature(exclusive_range_pattern)]
-#![deny(overlapping_patterns)]
+#![deny(overlapping_range_endpoints)]
macro_rules! m {
($s:expr, $t1:pat, $t2:pat) => {
@@ -12,27 +12,33 @@ macro_rules! m {
}
fn main() {
- m!(0u8, 20..=30, 30..=40); //~ ERROR multiple patterns covering the same range
- m!(0u8, 30..=40, 20..=30); //~ ERROR multiple patterns covering the same range
+ m!(0u8, 20..=30, 30..=40); //~ ERROR multiple patterns overlap on their endpoints
+ m!(0u8, 30..=40, 20..=30); //~ ERROR multiple patterns overlap on their endpoints
m!(0u8, 20..=30, 31..=40);
m!(0u8, 20..=30, 29..=40);
- m!(0u8, 20.. 30, 29..=40); //~ ERROR multiple patterns covering the same range
+ m!(0u8, 20.. 30, 29..=40); //~ ERROR multiple patterns overlap on their endpoints
m!(0u8, 20.. 30, 28..=40);
m!(0u8, 20.. 30, 30..=40);
m!(0u8, 20..=30, 30..=30);
- m!(0u8, 20..=30, 30..=31); //~ ERROR multiple patterns covering the same range
+ m!(0u8, 20..=30, 30..=31); //~ ERROR multiple patterns overlap on their endpoints
m!(0u8, 20..=30, 29..=30);
m!(0u8, 20..=30, 20..=20);
m!(0u8, 20..=30, 20..=21);
- m!(0u8, 20..=30, 19..=20); //~ ERROR multiple patterns covering the same range
+ m!(0u8, 20..=30, 19..=20); //~ ERROR multiple patterns overlap on their endpoints
m!(0u8, 20..=30, 20);
m!(0u8, 20..=30, 25);
m!(0u8, 20..=30, 30);
m!(0u8, 20.. 30, 29);
- m!(0u8, 20, 20..=30); //~ ERROR multiple patterns covering the same range
+ m!(0u8, 20, 20..=30);
m!(0u8, 25, 20..=30);
- m!(0u8, 30, 20..=30); //~ ERROR multiple patterns covering the same range
+ m!(0u8, 30, 20..=30);
+ match 0u8 {
+ 0..=10 => {}
+ 20..=30 => {}
+ 10..=20 => {} //~ ERROR multiple patterns overlap on their endpoints
+ _ => {}
+ }
match (0u8, true) {
(0..=10, true) => {}
(10..20, true) => {} // not detected
@@ -41,13 +47,13 @@ fn main() {
}
match (true, 0u8) {
(true, 0..=10) => {}
- (true, 10..20) => {} //~ ERROR multiple patterns covering the same range
+ (true, 10..20) => {} //~ ERROR multiple patterns overlap on their endpoints
(false, 10..20) => {}
_ => {}
}
match Some(0u8) {
Some(0..=10) => {}
- Some(10..20) => {} //~ ERROR multiple patterns covering the same range
+ Some(10..20) => {} //~ ERROR multiple patterns overlap on their endpoints
_ => {}
}
}
diff --git a/src/test/ui/pattern/usefulness/integer-ranges/overlapping_range_endpoints.stderr b/src/test/ui/pattern/usefulness/integer-ranges/overlapping_range_endpoints.stderr
index 7bb747cdf6fc1..24c0419e1dde3 100644
--- a/src/test/ui/pattern/usefulness/integer-ranges/overlapping_range_endpoints.stderr
+++ b/src/test/ui/pattern/usefulness/integer-ranges/overlapping_range_endpoints.stderr
@@ -1,80 +1,89 @@
-error: multiple patterns covering the same range
+error: multiple patterns overlap on their endpoints
--> $DIR/overlapping_range_endpoints.rs:15:22
|
LL | m!(0u8, 20..=30, 30..=40);
- | ------- ^^^^^^^ overlapping patterns
+ | ------- ^^^^^^^ ... with this range
| |
- | this range overlaps on `30_u8`
+ | this range overlaps on `30_u8`...
|
note: the lint level is defined here
--> $DIR/overlapping_range_endpoints.rs:2:9
|
-LL | #![deny(overlapping_patterns)]
- | ^^^^^^^^^^^^^^^^^^^^
+LL | #![deny(overlapping_range_endpoints)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ = note: you likely meant to write mutually exclusive ranges
-error: multiple patterns covering the same range
+error: multiple patterns overlap on their endpoints
--> $DIR/overlapping_range_endpoints.rs:16:22
|
LL | m!(0u8, 30..=40, 20..=30);
- | ------- ^^^^^^^ overlapping patterns
+ | ------- ^^^^^^^ ... with this range
| |
- | this range overlaps on `30_u8`
+ | this range overlaps on `30_u8`...
+ |
+ = note: you likely meant to write mutually exclusive ranges
-error: multiple patterns covering the same range
+error: multiple patterns overlap on their endpoints
--> $DIR/overlapping_range_endpoints.rs:19:22
|
LL | m!(0u8, 20.. 30, 29..=40);
- | ------- ^^^^^^^ overlapping patterns
+ | ------- ^^^^^^^ ... with this range
| |
- | this range overlaps on `29_u8`
+ | this range overlaps on `29_u8`...
+ |
+ = note: you likely meant to write mutually exclusive ranges
-error: multiple patterns covering the same range
+error: multiple patterns overlap on their endpoints
--> $DIR/overlapping_range_endpoints.rs:23:22
|
LL | m!(0u8, 20..=30, 30..=31);
- | ------- ^^^^^^^ overlapping patterns
+ | ------- ^^^^^^^ ... with this range
| |
- | this range overlaps on `30_u8`
+ | this range overlaps on `30_u8`...
+ |
+ = note: you likely meant to write mutually exclusive ranges
-error: multiple patterns covering the same range
+error: multiple patterns overlap on their endpoints
--> $DIR/overlapping_range_endpoints.rs:27:22
|
LL | m!(0u8, 20..=30, 19..=20);
- | ------- ^^^^^^^ overlapping patterns
+ | ------- ^^^^^^^ ... with this range
| |
- | this range overlaps on `20_u8`
-
-error: multiple patterns covering the same range
- --> $DIR/overlapping_range_endpoints.rs:32:17
+ | this range overlaps on `20_u8`...
|
-LL | m!(0u8, 20, 20..=30);
- | -- ^^^^^^^ overlapping patterns
- | |
- | this range overlaps on `20_u8`
+ = note: you likely meant to write mutually exclusive ranges
-error: multiple patterns covering the same range
- --> $DIR/overlapping_range_endpoints.rs:34:17
+error: multiple patterns overlap on their endpoints
+ --> $DIR/overlapping_range_endpoints.rs:39:9
|
-LL | m!(0u8, 30, 20..=30);
- | -- ^^^^^^^ overlapping patterns
- | |
- | this range overlaps on `30_u8`
+LL | 0..=10 => {}
+ | ------ this range overlaps on `10_u8`...
+LL | 20..=30 => {}
+ | ------- this range overlaps on `20_u8`...
+LL | 10..=20 => {}
+ | ^^^^^^^ ... with this range
+ |
+ = note: you likely meant to write mutually exclusive ranges
-error: multiple patterns covering the same range
- --> $DIR/overlapping_range_endpoints.rs:44:16
+error: multiple patterns overlap on their endpoints
+ --> $DIR/overlapping_range_endpoints.rs:50:16
|
LL | (true, 0..=10) => {}
- | ------ this range overlaps on `10_u8`
+ | ------ this range overlaps on `10_u8`...
LL | (true, 10..20) => {}
- | ^^^^^^ overlapping patterns
+ | ^^^^^^ ... with this range
+ |
+ = note: you likely meant to write mutually exclusive ranges
-error: multiple patterns covering the same range
- --> $DIR/overlapping_range_endpoints.rs:50:14
+error: multiple patterns overlap on their endpoints
+ --> $DIR/overlapping_range_endpoints.rs:56:14
|
LL | Some(0..=10) => {}
- | ------ this range overlaps on `10_u8`
+ | ------ this range overlaps on `10_u8`...
LL | Some(10..20) => {}
- | ^^^^^^ overlapping patterns
+ | ^^^^^^ ... with this range
+ |
+ = note: you likely meant to write mutually exclusive ranges
-error: aborting due to 9 previous errors
+error: aborting due to 8 previous errors
diff --git a/src/test/ui/pattern/usefulness/integer-ranges/reachability.rs b/src/test/ui/pattern/usefulness/integer-ranges/reachability.rs
index 6516925e93918..fb4d59b05780e 100644
--- a/src/test/ui/pattern/usefulness/integer-ranges/reachability.rs
+++ b/src/test/ui/pattern/usefulness/integer-ranges/reachability.rs
@@ -1,4 +1,5 @@
#![feature(exclusive_range_pattern)]
+#![allow(overlapping_range_endpoints)]
#![deny(unreachable_patterns)]
macro_rules! m {
diff --git a/src/test/ui/pattern/usefulness/integer-ranges/reachability.stderr b/src/test/ui/pattern/usefulness/integer-ranges/reachability.stderr
index e6878d950d625..9a02fac6a75dd 100644
--- a/src/test/ui/pattern/usefulness/integer-ranges/reachability.stderr
+++ b/src/test/ui/pattern/usefulness/integer-ranges/reachability.stderr
@@ -1,149 +1,149 @@
error: unreachable pattern
- --> $DIR/reachability.rs:16:17
+ --> $DIR/reachability.rs:17:17
|
LL | m!(0u8, 42, 42);
| ^^
|
note: the lint level is defined here
- --> $DIR/reachability.rs:2:9
+ --> $DIR/reachability.rs:3:9
|
LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:20:22
+ --> $DIR/reachability.rs:21:22
|
LL | m!(0u8, 20..=30, 20);
| ^^
error: unreachable pattern
- --> $DIR/reachability.rs:21:22
+ --> $DIR/reachability.rs:22:22
|
LL | m!(0u8, 20..=30, 21);
| ^^
error: unreachable pattern
- --> $DIR/reachability.rs:22:22
+ --> $DIR/reachability.rs:23:22
|
LL | m!(0u8, 20..=30, 25);
| ^^
error: unreachable pattern
- --> $DIR/reachability.rs:23:22
+ --> $DIR/reachability.rs:24:22
|
LL | m!(0u8, 20..=30, 29);
| ^^
error: unreachable pattern
- --> $DIR/reachability.rs:24:22
+ --> $DIR/reachability.rs:25:22
|
LL | m!(0u8, 20..=30, 30);
| ^^
error: unreachable pattern
- --> $DIR/reachability.rs:27:21
+ --> $DIR/reachability.rs:28:21
|
LL | m!(0u8, 20..30, 20);
| ^^
error: unreachable pattern
- --> $DIR/reachability.rs:28:21
+ --> $DIR/reachability.rs:29:21
|
LL | m!(0u8, 20..30, 21);
| ^^
error: unreachable pattern
- --> $DIR/reachability.rs:29:21
+ --> $DIR/reachability.rs:30:21
|
LL | m!(0u8, 20..30, 25);
| ^^
error: unreachable pattern
- --> $DIR/reachability.rs:30:21
+ --> $DIR/reachability.rs:31:21
|
LL | m!(0u8, 20..30, 29);
| ^^
error: unreachable pattern
- --> $DIR/reachability.rs:34:22
+ --> $DIR/reachability.rs:35:22
|
LL | m!(0u8, 20..=30, 20..=30);
| ^^^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:35:22
+ --> $DIR/reachability.rs:36:22
|
LL | m!(0u8, 20.. 30, 20.. 30);
| ^^^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:36:22
+ --> $DIR/reachability.rs:37:22
|
LL | m!(0u8, 20..=30, 20.. 30);
| ^^^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:38:22
+ --> $DIR/reachability.rs:39:22
|
LL | m!(0u8, 20..=30, 21..=30);
| ^^^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:39:22
+ --> $DIR/reachability.rs:40:22
|
LL | m!(0u8, 20..=30, 20..=29);
| ^^^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:41:24
+ --> $DIR/reachability.rs:42:24
|
LL | m!('a', 'A'..='z', 'a'..='z');
| ^^^^^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:48:9
+ --> $DIR/reachability.rs:49:9
|
LL | 5..=8 => {},
| ^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:54:9
+ --> $DIR/reachability.rs:55:9
|
LL | 5..15 => {},
| ^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:61:9
+ --> $DIR/reachability.rs:62:9
|
LL | 5..25 => {},
| ^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:69:9
+ --> $DIR/reachability.rs:70:9
|
LL | 5..25 => {},
| ^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:75:9
+ --> $DIR/reachability.rs:76:9
|
LL | 5..15 => {},
| ^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:82:9
+ --> $DIR/reachability.rs:83:9
|
LL | '\u{D7FF}'..='\u{E000}' => {},
| ^^^^^^^^^^^^^^^^^^^^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:103:9
+ --> $DIR/reachability.rs:104:9
|
LL | &FOO => {}
| ^^^^
error: unreachable pattern
- --> $DIR/reachability.rs:104:9
+ --> $DIR/reachability.rs:105:9
|
LL | BAR => {}
| ^^^
diff --git a/triagebot.toml b/triagebot.toml
index fc733b9e45f18..c0cf50e516700 100644
--- a/triagebot.toml
+++ b/triagebot.toml
@@ -90,7 +90,7 @@ exclude_labels = [
[notify-zulip."I-prioritize"]
zulip_stream = 245100 # #t-compiler/wg-prioritization/alerts
-topic = "I-prioritize #{number} {title}"
+topic = "#{number} {title}"
message_on_add = """\
@*WG-prioritization/alerts* issue #{number} has been requested for prioritization.