Skip to content

Rollup of 8 pull requests #86054

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Jun 6, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
a36c636
Avoid cloning cache key
tamird May 18, 2021
42b9d3f
Simplify `map | unwrap_or` to `map_or`
tamird May 18, 2021
cffef33
Move metadata objects to before as-needed/zignore flags to make sure …
luqmana May 28, 2021
56a2a2a
don't clone attrs
klensy May 30, 2021
f667aca
Tweak wasm_base target spec to indicate linker is not GNU and update …
luqmana Jun 2, 2021
01d4d46
Replace IntoIter::new with IntoIterator::into_iter in std
mominul May 30, 2021
507d97b
Update expressions where we can use array's IntoIterator implementation
mominul Jun 2, 2021
f4080fc
Drop an `if let` that will always succeed
LingMan Jun 5, 2021
e1180f5
Escape <meta> content attribute value
GuillaumeGomez Jun 3, 2021
8c9200d
Add missing backslash in HTML layout string
GuillaumeGomez Jun 3, 2021
e078e56
Fix invalid ID value in all.html file
GuillaumeGomez Jun 3, 2021
b8ebf44
Don't fire `invalid_doc_attributes` on `extern crate` items
jyn514 Jun 6, 2021
b3bcf4a
Rollup merge of #85436 - tamird:save-clone, r=estebank
JohnTitor Jun 6, 2021
d69cd46
Rollup merge of #85772 - luqmana:ignored-metadata, r=petrochenkov
JohnTitor Jun 6, 2021
679a1d1
Rollup merge of #85920 - luqmana:wasm-linker-tweaks, r=petrochenkov
JohnTitor Jun 6, 2021
f923f73
Rollup merge of #85930 - mominul:array_into_iter, r=m-ou-se
JohnTitor Jun 6, 2021
302f3dc
Rollup merge of #85972 - GuillaumeGomez:rustdoc-html-fixes, r=jsha
JohnTitor Jun 6, 2021
1886123
Rollup merge of #86028 - LingMan:dupe_empty_check, r=jyn514
JohnTitor Jun 6, 2021
2f0a855
Rollup merge of #86043 - klensy:attr-clone, r=jyn514
JohnTitor Jun 6, 2021
19433c4
Rollup merge of #86047 - jyn514:doc-attrs, r=petrochenkov
JohnTitor Jun 6, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Don't fire invalid_doc_attributes on extern crate items
  • Loading branch information
jyn514 committed Jun 6, 2021
commit b8ebf4431e48abe6f1844b80416c11f7b0ccab0c
2 changes: 1 addition & 1 deletion compiler/rustc_passes/src/check_attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ impl CheckAttrVisitor<'tcx> {
target: Target,
specified_inline: &mut Option<(bool, Span)>,
) -> bool {
if target == Target::Use {
if target == Target::Use || target == Target::ExternCrate {
let do_inline = meta.name_or_empty() == sym::inline;
if let Some((prev_inline, prev_span)) = *specified_inline {
if do_inline != prev_inline {
Expand Down
9 changes: 9 additions & 0 deletions src/test/ui/rustdoc/doc-inline-extern-crate.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#[doc(inline)]
//~^ ERROR conflicting
#[doc(no_inline)]
pub extern crate core;

// no warning
pub extern crate alloc;

fn main() {}
13 changes: 13 additions & 0 deletions src/test/ui/rustdoc/doc-inline-extern-crate.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
error: conflicting doc inlining attributes
--> $DIR/doc-inline-extern-crate.rs:1:7
|
LL | #[doc(inline)]
| ^^^^^^ this attribute...
LL |
LL | #[doc(no_inline)]
| ^^^^^^^^^ ...conflicts with this attribute
|
= help: remove one of the conflicting attributes

error: aborting due to previous error