From 8b3f28cf0f0cd30ddba884b10c395391ff22beb0 Mon Sep 17 00:00:00 2001 From: Evgenii P Date: Sat, 27 Jul 2019 16:45:45 +0700 Subject: Make more informative error on outer attr after inner --- src/test/ui/parser/inner-attr.stderr | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/test/ui/parser') diff --git a/src/test/ui/parser/inner-attr.stderr b/src/test/ui/parser/inner-attr.stderr index 11a37bc139b..070d9f47d96 100644 --- a/src/test/ui/parser/inner-attr.stderr +++ b/src/test/ui/parser/inner-attr.stderr @@ -1,8 +1,11 @@ error: an inner attribute is not permitted following an outer attribute - --> $DIR/inner-attr.rs:3:3 + --> $DIR/inner-attr.rs:3:1 | +LL | #[feature(lang_items)] + | ---------------------- previous outer attribute +LL | LL | #![recursion_limit="100"] - | ^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^ not permitted following an outer attibute | = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them. -- cgit 1.4.1-3-g733a5 From 2787cb23f0f3178f5eae11d571ee5e026b79d7fb Mon Sep 17 00:00:00 2001 From: Evgenii P Date: Sat, 27 Jul 2019 18:24:48 +0700 Subject: Fix failing UI tests --- src/test/ui/issues/issue-45296.stderr | 4 ++-- src/test/ui/parser/inner-attr-after-doc-comment.stderr | 11 ++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'src/test/ui/parser') diff --git a/src/test/ui/issues/issue-45296.stderr b/src/test/ui/issues/issue-45296.stderr index bc14d20b623..c0d4ce1243e 100644 --- a/src/test/ui/issues/issue-45296.stderr +++ b/src/test/ui/issues/issue-45296.stderr @@ -1,8 +1,8 @@ error: an inner attribute is not permitted in this context - --> $DIR/issue-45296.rs:4:7 + --> $DIR/issue-45296.rs:4:5 | LL | #![allow(unused_variables)] - | ^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them. diff --git a/src/test/ui/parser/inner-attr-after-doc-comment.stderr b/src/test/ui/parser/inner-attr-after-doc-comment.stderr index 0dde49a2913..b012abc25e7 100644 --- a/src/test/ui/parser/inner-attr-after-doc-comment.stderr +++ b/src/test/ui/parser/inner-attr-after-doc-comment.stderr @@ -1,8 +1,13 @@ error: an inner attribute is not permitted following an outer doc comment - --> $DIR/inner-attr-after-doc-comment.rs:6:3 + --> $DIR/inner-attr-after-doc-comment.rs:6:1 | -LL | #![recursion_limit="100"] - | ^ +LL | / /** +LL | | * My module +LL | | */ + | |___- previous doc comment +LL | +LL | #![recursion_limit="100"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^ not permitted following an outer attibute | = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them. -- cgit 1.4.1-3-g733a5 From 693be441f4c2d74805b855612556c54438c3022c Mon Sep 17 00:00:00 2001 From: Evgenii P Date: Sat, 27 Jul 2019 19:35:55 +0700 Subject: Fix ui/parser/attr test --- src/test/ui/parser/attr.stderr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/test/ui/parser') diff --git a/src/test/ui/parser/attr.stderr b/src/test/ui/parser/attr.stderr index 5111b40603c..400a0276b3b 100644 --- a/src/test/ui/parser/attr.stderr +++ b/src/test/ui/parser/attr.stderr @@ -1,8 +1,8 @@ error: an inner attribute is not permitted in this context - --> $DIR/attr.rs:5:3 + --> $DIR/attr.rs:5:1 | LL | #![lang = "foo"] - | ^ + | ^^^^^^^^^^^^^^^^ | = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them. -- cgit 1.4.1-3-g733a5