summary refs log tree commit diff
path: root/src/test/rustdoc
AgeCommit message (Collapse)AuthorLines
2020-07-11rustdoc: insert newlines between attributesAndy Russell-2/+2
2020-07-09Rollup merge of #74107 - nbdd0121:rustdoc, r=GuillaumeGomezManish Goregaokar-0/+21
Hide `&mut self` methods from Deref in sidebar if there are no `DerefMut` impl for the type. This partially addresses #74083.
2020-07-09Rollup merge of #74077 - sethp:docs/fix-intra-doc-primitive-link, r=jyn514Manish Goregaokar-0/+71
Use relative path for local links to primitives Else, links to `char::foo` would point into `/path/to/src/libcore/std/primitive.char.html#method.foo`. Split out from #73804.
2020-07-09Add testManish Goregaokar-1/+3
2020-07-08Avoid running test on Windows platformsSeth Pellegrino-0/+1
There don't seem to be any other compiletests that are 1) building a standalone "no_core" create and then 2) trying to link against it. There seems to be a platform-specific limitation in doing so: ``` 2020-07-08T16:07:42.9419409Z = note: Creating library D:\a\rust\rust\build\i686-pc-windows-msvc\test\rustdoc\intra-link-prim-methods-external-core\auxiliary\my_core.dll.lib and object D:\a\rust\rust\build\i686-pc-windows-msvc\test\rustdoc\intra-link-prim-methods-external-core\auxiliary\my_core.dll.exp 2020-07-08T16:07:42.9419810Z LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12 2020-07-08T16:07:42.9420032Z D:\a\rust\rust\build\i686-pc-windows-msvc\test\rustdoc\intra-link-prim-methods-external-core\auxiliary\my_core.dll : fatal error LNK1120: 1 unresolved externals ``` Possibly this could be resolved by adding a `__DllMainCRTStartup` or `__DllMainCRTStartup@12` symbol in an architecture- and platform-specific way.
2020-07-08Apply #![crate_type = "rlib"] directly to the linkerSeth Pellegrino-0/+3
2020-07-07ignore-tidy-linelength for @has assertionsSeth Pellegrino-0/+5
2020-07-07Assert current behavior for linksSeth Pellegrino-0/+12
For the two of these tests that have a local `char` to link to, this behavior isn't what's expected, but is what's happening presently.
2020-07-06build extern docs as wellSeth Pellegrino-0/+1
2020-07-06Two new rustdoc tests for intra linksSeth Pellegrino-0/+49
They both produce less-than-desirable output (links going to docs.rust-lang.org), but I haven't figured out yet how to assert about them properly.
2020-07-06Rollup merge of #74078 - jyn514:lut, r=ManishearthManish Goregaokar-0/+12
Always resolve type@primitive as a primitive, not a module Previously, if there were a module in scope with the same name as the primitive, that would take precedence. Coupled with https://github.com/rust-lang/rust/issues/58699, this made it impossible to link to the primitive when that module was in scope. This approach could be extended so that `struct@foo` would no longer resolve to any type, etc. However, it could not be used for glob imports: ```rust pub mod foo { pub struct Bar; } pub enum Bar {} use foo::*; // This is expected to link to `inner::Bar`, but instead it will link to the enum. /// Link to [struct@Bar] pub struct MyDocs; ``` The reason for this is that this change does not affect the resolution algorithm of rustc_resolve at all. The only reason we could special-case primitives is because we have a list of all possible primitives ahead of time. Closes https://github.com/rust-lang/rust/issues/74063 r? @Manishearth
2020-07-06Add test for issue 74083Gary Guo-0/+21
2020-07-05Always resolve type@primitive as a primitive, not a moduleJoshua Nelson-0/+12
Previously, if there were a module in scope with the same name as the primitive, that would take precedence. Coupled with https://github.com/rust-lang/rust/issues/58699, this made it impossible to link to the primitive when that module was in scope. This approach could be extended so that `struct@foo` would no longer resolve to any type, etc. However, it could not be used for glob imports: ```rust pub mod foo { pub struct Bar; } pub enum Bar {} use foo::*; // This is expected to link to `inner::Bar`, but instead it will link to the enum. /// Link to [struct@Bar] pub struct MyDocs; ``` The reason for this is that this change does not affect the resolution algorithm of rustc_resolve at all. The only reason we could special-case primitives is because we have a list of all possible primitives ahead of time.
2020-07-02Remove render-redirect-pages option in rustdocGuillaume Gomez-11/+0
2020-07-02Update rustdoc testsGuillaume Gomez-28/+23
2020-06-26Show the values and computation that would overflow a const evaluation or ↵Oliver Scherer-2/+1
propagation
2020-06-19Rollup merge of #73452 - matthewjasper:auto-rec, r=nikomatsakisManish Goregaokar-0/+35
Unify region variables when projecting associated types This is required to avoid cycles when evaluating auto trait predicates. Notably, this is required to be able add Chalk types to `CtxtInterners` for `cfg(parallel_compiler)`. r? @nikomatsakis
2020-06-19Rollup merge of #73044 - tmiasko:compiletest-san, r=nikomatsakisRalf Jung-0/+1
compiletest: Add directives to detect sanitizer support Add needs-sanitizer-{address,leak,memory,thread} directive indicating that test requires target with support for specific sanitizer. This is an addition to the existing needs-sanitizer-support directive indicating that test requires a sanitizer runtime library. The existing needs-sanitizer-support directive could be incorporated into the new ones, but I decided to retain it, since it enables running sanitizer codegen tests even when building of sanitizer runtime libraries is disabled.
2020-06-18Add test for overflow when finding auto-trait impls in RustdocAaron Hill-0/+35
2020-06-18Removed trailing whitespaceJake Degen-1/+1
2020-06-18Added tooltip for should_panic code examples.Jake Degen-0/+5
Previously, compile_fail and ignore code examples displayed a tooltip indicating this in the documentation. This tooltip has now also been added to should_panic examples.
2020-06-15Auto merge of #72080 - matthewjasper:uniform-impl-trait, r=nikomatsakisbors-0/+31
Clean up type alias impl trait implementation - Removes special case for top-level impl trait - Removes associated opaque types - Forbid lifetime elision in let position impl trait. This is consistent with the behavior for inferred types. - Handle lifetimes in type alias impl trait more uniformly with other parameters cc #69323 cc #63063 Closes #57188 Closes #62988 Closes #69136 Closes #73061
2020-06-13compiletest: Add directives to detect sanitizer supportTomasz Miąsko-0/+1
Add needs-sanitizer-{address,leak,memory,thread} directive indicating that test requires target with support for specific sanitizer. This is an addition to the existing needs-sanitizer-support directive indicating that test requires a sanitizer runtime library.
2020-06-12Rollup merge of #72906 - lzutao:migrate-numeric-assoc-consts, r=dtolnayDylan DPC-4/+4
Migrate to numeric associated consts The deprecation PR is #72885 cc #68490 cc rust-lang/rfcs#2700
2020-06-11Add more tests for type alias impl TraitMatthew Jasper-0/+31
2020-06-10Add tests for macro@ and derive@Manish Goregaokar-1/+7
2020-06-10Avoid collisions between traits and their derive macrosManish Goregaokar-1/+10
2020-06-10Migrate to numeric associated constsLzu Tao-4/+4
2020-06-09Add test for proc macro resolution in intra doc linksManish Goregaokar-0/+47
2020-05-22Allow using `Self::` in docTymoteusz Jankowski-0/+88
2020-05-19Make intra-link resolve links for both trait and impl itemsTymoteusz Jankowski-0/+19
2020-05-13Make intra links work inside trait impl blockTymoteusz Jankowski-0/+35
2020-05-12Rollup merge of #71928 - mibac138:strikethrough, r=GuillaumeGomezDylan DPC-0/+6
Add strikethrough support to rustdoc Implements uncontroversial part of #71183. r? @GuillaumeGomez
2020-05-08Add test for strikethrough in rustdocmibac138-0/+6
2020-05-08Add test for deprecated emojiGuillaume Gomez-2/+2
2020-05-06Rollup merge of #71918 - GuillaumeGomez:rename-methods-section, r=Dylan-DPCDylan DPC-12/+21
Rename methods section Fixes https://github.com/rust-lang/rust/issues/70475. It renames the section [methods](https://doc.rust-lang.org/nightly/std/string/struct.String.html#methods) into "Implementations". However, I didn't not update the title in the sidebar considering that it only lists methods under (even though I updated the link of the "methods" to make it point to the "implementations" section. r? @kinnison cc @rust-lang/rustdoc
2020-05-05Add test for new implementations section titleGuillaume Gomez-0/+9
2020-05-05Update testsGuillaume Gomez-12/+12
2020-04-29rustdoc supports const re-exportsMark Rousskov-7/+7
2020-04-20Fix show-const-contents rustdoc testLinus Färnstrand-1/+1
2020-04-08rustdoc: Don't try to load source files from external cratesOliver Middleton-1/+37
Local items defined in external macros shouldn't generate rendered source files and should link to the external crate's docs instead.
2020-03-26introduce `negative_impls` feature gate and documentNiko Matsakis-5/+6
They used to be covered by `optin_builtin_traits` but negative impls are now applicable to all traits, not just auto traits. This also adds docs in the unstable book for the current state of auto traits.
2020-03-23Rollup merge of #69494 - GuillaumeGomez:stabilize-crate-version, ↵Mazdak Farrokhzad-1/+1
r=ehuss,aleksator,ollie27 Stabilize --crate-version option in rustdoc I don't see any reason to not stabilize it anymore, so let's go! cc @kinnison @ehuss r? @ollie27
2020-03-17Update rustdoc test and remove TODO commentGuillaume Gomez-1/+1
2020-03-15Render full attributes in rustdocvarkor-0/+4
2020-03-10Auto merge of #66364 - Centril:cleanup-macro-def, r=petrochenkov,eddybbors-1/+1
Cleanup `rmeta::MacroDef` Avoid using rountrip parsing in the encoder and in `fn load_macro_untracked`. The main reason I was interested in this was to remove `rustc_parse` as a dependency of `rustc_metadata` but it seems like this had other benefits as well. Fixes #49511. r? @eddyb cc @matthewjasper @estebank @petrochenkov
2020-03-10pacify rustdoc by using better urlMazdak Farrokhzad-1/+1
2020-03-10Rollup merge of #69514 - GuillaumeGomez:remove-spotlight, r=kinnisonMazdak Farrokhzad-36/+0
Remove spotlight I had a few comments saying that this feature was at best misunderstood or not even used so I decided to organize a poll about on [twitter](https://twitter.com/imperioworld_/status/1232769353503956994). After 87 votes, the result is very clear: it's not useful. Considering the amount of code we have just to run it, I think it's definitely worth it to remove it. r? @kinnison cc @ollie27
2020-03-01Rollup merge of #69598 - ollie27:rustdoc_crate-version_escape, r=GuillaumeGomezDylan DPC-0/+6
rustdoc: HTML escape crate version As `--crate-version` accepts arbitrary strings they need to be escaped. r? @GuillaumeGomez
2020-03-01rustdoc: HTML escape crate versionOliver Middleton-0/+6
As `--crate-version` accepts arbitrary strings they need to be escaped.