about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-01-16 13:27:27 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-01-18 10:46:32 -0800
commit4a78364d491ee2d3a49f4ed5e62f63cd5748d898 (patch)
treeea10560a8b460cc07496455c1fbc5621e44fc160 /src/libsyntax
parent9434e7c6cb658367d91eb8aae5fac6a5c8b5f769 (diff)
downloadrust-4a78364d491ee2d3a49f4ed5e62f63cd5748d898.tar.gz
rust-4a78364d491ee2d3a49f4ed5e62f63cd5748d898.zip
Forbid unnecessary visibility on view items
For `use` statements, this means disallowing qualifiers when in functions and
disallowing `priv` outside of functions.

For `extern mod` statements, this means disallowing everything everywhere. It
may have been envisioned for `pub extern mod foo` to be a thing, but it
currently doesn't do anything (resolve doesn't pick it up), so better to err on
the side of forwards-compatibility and forbid it entirely for now.

Closes #9957
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ext/quote.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs
index e66e394d639..7c2175503e0 100644
--- a/src/libsyntax/ext/quote.rs
+++ b/src/libsyntax/ext/quote.rs
@@ -648,7 +648,7 @@ fn expand_wrapper(cx: &ExtCtxt,
                   sp: Span,
                   cx_expr: @ast::Expr,
                   expr: @ast::Expr) -> @ast::Expr {
-    let uses = ~[ cx.view_use_glob(sp, ast::Public,
+    let uses = ~[ cx.view_use_glob(sp, ast::Inherited,
                                    ids_ext(~[~"syntax",
                                              ~"ext",
                                              ~"quote",