diff options
| author | bors <bors@rust-lang.org> | 2021-04-05 11:06:20 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-04-05 11:06:20 +0000 |
| commit | 39eee173fbcc21462d255b364b87715cd33b62db (patch) | |
| tree | e930e86d52114de16148de08b917c974cb874669 /src/test | |
| parent | 58e71896506edb701f276158bd2f47e8788a1133 (diff) | |
| parent | 3ca197e89c9affc76e79f0421e1bb9d65a8ec855 (diff) | |
Auto merge of #83880 - Dylan-DPC:rollup-hz9ph0e, r=Dylan-DPC
Rollup of 8 pull requests Successful merges: - #81922 (Let `#[allow(unstable_name_collisions)]` work for things other than function) - #82483 (Use FromStr trait for number option parsing) - #82739 (Use the beta compiler for building bootstrap tools when `download-rustc` is set) - #83650 (Update Source Serif to release 4.004) - #83826 (List trait impls before deref methods in doc's sidebar) - #83831 (Add `#[inline]` to IpAddr methods) - #83863 (Render destructured struct function param names as underscore) - #83865 (Don't report disambiguator error if link would have been ignored) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/test')
7 files changed, 75 insertions, 7 deletions
diff --git a/src/test/run-make-fulldeps/print-unversioned-files/unversioned-files.txt b/src/test/run-make-fulldeps/print-unversioned-files/unversioned-files.txt index befbdab0ad9..4b20cd5d745 100644 --- a/src/test/run-make-fulldeps/print-unversioned-files/unversioned-files.txt +++ b/src/test/run-make-fulldeps/print-unversioned-files/unversioned-files.txt @@ -10,7 +10,7 @@ SourceCodePro-It.ttf.woff SourceCodePro-LICENSE.txt SourceCodePro-Regular.ttf.woff SourceCodePro-Semibold.ttf.woff -SourceSerifPro-Bold.ttf.woff -SourceSerifPro-It.ttf.woff -SourceSerifPro-LICENSE.md -SourceSerifPro-Regular.ttf.woff +SourceSerif4-Bold.ttf.woff +SourceSerif4-It.ttf.woff +SourceSerif4-LICENSE.md +SourceSerif4-Regular.ttf.woff diff --git a/src/test/run-make/emit-shared-files/Makefile b/src/test/run-make/emit-shared-files/Makefile index 5c4825ae66c..d89b526d430 100644 --- a/src/test/run-make/emit-shared-files/Makefile +++ b/src/test/run-make/emit-shared-files/Makefile @@ -14,7 +14,7 @@ invocation-only: [ -e $(INVOCATION_ONLY)/x/index.html ] [ -e $(INVOCATION_ONLY)/theme-xxx.css ] # generated from z.css ! [ -e $(INVOCATION_ONLY)/storage-xxx.js ] - ! [ -e $(INVOCATION_ONLY)/SourceSerifPro-It.ttf.woff ] + ! [ -e $(INVOCATION_ONLY)/SourceSerif4-It.ttf.woff ] # FIXME: this probably shouldn't have a suffix [ -e $(INVOCATION_ONLY)/y-xxx.css ] @@ -24,7 +24,7 @@ invocation-only: toolchain-only: $(RUSTDOC) -Z unstable-options --emit=toolchain-shared-resources --output $(TOOLCHAIN_ONLY) --resource-suffix=-xxx --extend-css z.css x.rs [ -e $(TOOLCHAIN_ONLY)/storage-xxx.js ] - ! [ -e $(TOOLCHAIN_ONLY)/SourceSerifPro-It.ttf.woff ] + ! [ -e $(TOOLCHAIN_ONLY)/SourceSerif4-It.ttf.woff ] ! [ -e $(TOOLCHAIN_ONLY)/search-index-xxx.js ] ! [ -e $(TOOLCHAIN_ONLY)/x/index.html ] ! [ -e $(TOOLCHAIN_ONLY)/theme.css ] @@ -35,7 +35,7 @@ toolchain-only: all-shared: $(RUSTDOC) -Z unstable-options --emit=toolchain-shared-resources,unversioned-shared-resources --output $(ALL_SHARED) --resource-suffix=-xxx --extend-css z.css x.rs [ -e $(ALL_SHARED)/storage-xxx.js ] - [ -e $(ALL_SHARED)/SourceSerifPro-It.ttf.woff ] + [ -e $(ALL_SHARED)/SourceSerif4-It.ttf.woff ] ! [ -e $(ALL_SHARED)/search-index-xxx.js ] ! [ -e $(ALL_SHARED)/settings.html ] ! [ -e $(ALL_SHARED)/x ] diff --git a/src/test/rustdoc-ui/intra-doc/email-address-localhost.rs b/src/test/rustdoc-ui/intra-doc/email-address-localhost.rs new file mode 100644 index 00000000000..417618c7458 --- /dev/null +++ b/src/test/rustdoc-ui/intra-doc/email-address-localhost.rs @@ -0,0 +1,6 @@ +#![deny(warnings)] + +//! Email me at <hello@localhost>. +//~^ ERROR unknown disambiguator `hello` + +//! This should *not* warn: <hello@example.com>. diff --git a/src/test/rustdoc-ui/intra-doc/email-address-localhost.stderr b/src/test/rustdoc-ui/intra-doc/email-address-localhost.stderr new file mode 100644 index 00000000000..de215b2163b --- /dev/null +++ b/src/test/rustdoc-ui/intra-doc/email-address-localhost.stderr @@ -0,0 +1,15 @@ +error: unknown disambiguator `hello` + --> $DIR/email-address-localhost.rs:3:18 + | +LL | //! Email me at <hello@localhost>. + | ^^^^^ + | +note: the lint level is defined here + --> $DIR/email-address-localhost.rs:1:9 + | +LL | #![deny(warnings)] + | ^^^^^^^^ + = note: `#[deny(rustdoc::broken_intra_doc_links)]` implied by `#[deny(warnings)]` + +error: aborting due to previous error + diff --git a/src/test/rustdoc/intra-doc/email-address.rs b/src/test/rustdoc/intra-doc/email-address.rs new file mode 100644 index 00000000000..c407eb80da2 --- /dev/null +++ b/src/test/rustdoc/intra-doc/email-address.rs @@ -0,0 +1,6 @@ +//! Email me at <hello@example.com>. +//! Email me at <hello-world@example.com>. +//! Email me at <hello@localhost> (this warns but will still become a link). +// @has email_address/index.html '//a[@href="mailto:hello@example.com"]' 'hello@example.com' +// @has email_address/index.html '//a[@href="mailto:hello-world@example.com"]' 'hello-world@example.com' +// @has email_address/index.html '//a[@href="mailto:hello@localhost"]' 'hello@localhost' diff --git a/src/test/rustdoc/struct-arg-pattern.rs b/src/test/rustdoc/struct-arg-pattern.rs new file mode 100644 index 00000000000..3c0369e3d34 --- /dev/null +++ b/src/test/rustdoc/struct-arg-pattern.rs @@ -0,0 +1,10 @@ +#![crate_name = "foo"] + +struct BodyId { + hir_id: usize, +} + +// @has 'foo/fn.body_owner.html' '//*[@class="rust fn"]' 'pub fn body_owner(_: BodyId)' +pub fn body_owner(BodyId { hir_id }: BodyId) { + // ... +} diff --git a/src/test/ui/inference/issue-81522.rs b/src/test/ui/inference/issue-81522.rs new file mode 100644 index 00000000000..902f8fdde58 --- /dev/null +++ b/src/test/ui/inference/issue-81522.rs @@ -0,0 +1,31 @@ +// Regression test for #81522. +// Ensures that `#[allow(unstable_name_collisions)]` appended to things other than function +// suppresses the corresponding diagnostics emitted from inside them. +// But note that this attribute doesn't work for macro invocations if it is appended directly. + +// aux-build:inference_unstable_iterator.rs +// aux-build:inference_unstable_itertools.rs +// run-pass + +extern crate inference_unstable_iterator; +extern crate inference_unstable_itertools; + +#[allow(unused_imports)] +use inference_unstable_iterator::IpuIterator; +use inference_unstable_itertools::IpuItertools; + +fn main() { + // expression statement + #[allow(unstable_name_collisions)] + 'x'.ipu_flatten(); + + // let statement + #[allow(unstable_name_collisions)] + let _ = 'x'.ipu_flatten(); + + // block expression + #[allow(unstable_name_collisions)] + { + 'x'.ipu_flatten(); + } +} |
