Auto merge of #102819 - matthiaskrgr:rollup-xwnvofc, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #99194 (Fix gdb-cmd for rust-gdbgui) - #99880 (`EscapeAscii` is not an `ExactSizeIterator`) - #102524 (rustdoc: remove weird `<a href="#">` wrapper around unsafe triangle) - #102581 (Make the `config.src` handling for downloadable bootstrap more conservative) - #102604 (Improve readability of bootstrap's README) - #102723 (test: run-make: skip when cross-compiling) - #102815 (rustdoc: remove mobile topbar from source pages instead of hiding it) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
f382c2748a
12 changed files with 97 additions and 54 deletions
|
@ -215,8 +215,6 @@ impl<'a> iter::DoubleEndedIterator for EscapeAscii<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[stable(feature = "inherent_ascii_escape", since = "1.60.0")]
|
#[stable(feature = "inherent_ascii_escape", since = "1.60.0")]
|
||||||
impl<'a> iter::ExactSizeIterator for EscapeAscii<'a> {}
|
|
||||||
#[stable(feature = "inherent_ascii_escape", since = "1.60.0")]
|
|
||||||
impl<'a> iter::FusedIterator for EscapeAscii<'a> {}
|
impl<'a> iter::FusedIterator for EscapeAscii<'a> {}
|
||||||
#[stable(feature = "inherent_ascii_escape", since = "1.60.0")]
|
#[stable(feature = "inherent_ascii_escape", since = "1.60.0")]
|
||||||
impl<'a> fmt::Display for EscapeAscii<'a> {
|
impl<'a> fmt::Display for EscapeAscii<'a> {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# rustbuild - Bootstrapping Rust
|
# rustbuild - Bootstrapping Rust
|
||||||
|
|
||||||
This is an in-progress README which is targeted at helping to explain how Rust
|
This is an in-progress README which is targeted at helping to explain how Rust
|
||||||
is bootstrapped and in general some of the technical details of the build
|
is bootstrapped and in general, some of the technical details of the build
|
||||||
system.
|
system.
|
||||||
|
|
||||||
## Using rustbuild
|
## Using rustbuild
|
||||||
|
@ -12,7 +12,7 @@ The rustbuild build system has a primary entry point, a top level `x.py` script:
|
||||||
$ python ./x.py build
|
$ python ./x.py build
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that if you're on Unix you should be able to execute the script directly:
|
Note that if you're on Unix, you should be able to execute the script directly:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ ./x.py build
|
$ ./x.py build
|
||||||
|
@ -20,8 +20,8 @@ $ ./x.py build
|
||||||
|
|
||||||
The script accepts commands, flags, and arguments to determine what to do:
|
The script accepts commands, flags, and arguments to determine what to do:
|
||||||
|
|
||||||
* `build` - a general purpose command for compiling code. Alone `build` will
|
* `build` - a general purpose command for compiling code. Alone, `build` will
|
||||||
bootstrap the entire compiler, and otherwise arguments passed indicate what to
|
bootstrap the entire compiler, and otherwise, arguments passed indicate what to
|
||||||
build. For example:
|
build. For example:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -38,7 +38,7 @@ The script accepts commands, flags, and arguments to determine what to do:
|
||||||
./x.py build --stage 0 library/test
|
./x.py build --stage 0 library/test
|
||||||
```
|
```
|
||||||
|
|
||||||
If files are dirty that would normally be rebuilt from stage 0, that can be
|
If files that would normally be rebuilt from stage 0 are dirty, the rebuild can be
|
||||||
overridden using `--keep-stage 0`. Using `--keep-stage n` will skip all steps
|
overridden using `--keep-stage 0`. Using `--keep-stage n` will skip all steps
|
||||||
that belong to stage n or earlier:
|
that belong to stage n or earlier:
|
||||||
|
|
||||||
|
@ -47,8 +47,8 @@ The script accepts commands, flags, and arguments to determine what to do:
|
||||||
./x.py build --keep-stage 0
|
./x.py build --keep-stage 0
|
||||||
```
|
```
|
||||||
|
|
||||||
* `test` - a command for executing unit tests. Like the `build` command this
|
* `test` - a command for executing unit tests. Like the `build` command, this
|
||||||
will execute the entire test suite by default, and otherwise it can be used to
|
will execute the entire test suite by default, and otherwise, it can be used to
|
||||||
select which test suite is run:
|
select which test suite is run:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -75,7 +75,7 @@ The script accepts commands, flags, and arguments to determine what to do:
|
||||||
./x.py test src/doc
|
./x.py test src/doc
|
||||||
```
|
```
|
||||||
|
|
||||||
* `doc` - a command for building documentation. Like above can take arguments
|
* `doc` - a command for building documentation. Like above, can take arguments
|
||||||
for what to document.
|
for what to document.
|
||||||
|
|
||||||
## Configuring rustbuild
|
## Configuring rustbuild
|
||||||
|
@ -110,12 +110,12 @@ compiler. What actually happens when you invoke rustbuild is:
|
||||||
compiles the build system itself (this folder). Finally, it then invokes the
|
compiles the build system itself (this folder). Finally, it then invokes the
|
||||||
actual `bootstrap` binary build system.
|
actual `bootstrap` binary build system.
|
||||||
2. In Rust, `bootstrap` will slurp up all configuration, perform a number of
|
2. In Rust, `bootstrap` will slurp up all configuration, perform a number of
|
||||||
sanity checks (compilers exist for example), and then start building the
|
sanity checks (whether compilers exist, for example), and then start building the
|
||||||
stage0 artifacts.
|
stage0 artifacts.
|
||||||
3. The stage0 `cargo` downloaded earlier is used to build the standard library
|
3. The stage0 `cargo`, downloaded earlier, is used to build the standard library
|
||||||
and the compiler, and then these binaries are then copied to the `stage1`
|
and the compiler, and then these binaries are then copied to the `stage1`
|
||||||
directory. That compiler is then used to generate the stage1 artifacts which
|
directory. That compiler is then used to generate the stage1 artifacts which
|
||||||
are then copied to the stage2 directory, and then finally the stage2
|
are then copied to the stage2 directory, and then finally, the stage2
|
||||||
artifacts are generated using that compiler.
|
artifacts are generated using that compiler.
|
||||||
|
|
||||||
The goal of each stage is to (a) leverage Cargo as much as possible and failing
|
The goal of each stage is to (a) leverage Cargo as much as possible and failing
|
||||||
|
@ -149,7 +149,7 @@ like this:
|
||||||
build/
|
build/
|
||||||
|
|
||||||
# Location where the stage0 compiler downloads are all cached. This directory
|
# Location where the stage0 compiler downloads are all cached. This directory
|
||||||
# only contains the tarballs themselves as they're extracted elsewhere.
|
# only contains the tarballs themselves, as they're extracted elsewhere.
|
||||||
cache/
|
cache/
|
||||||
2015-12-19/
|
2015-12-19/
|
||||||
2016-01-15/
|
2016-01-15/
|
||||||
|
@ -172,10 +172,10 @@ build/
|
||||||
# hand.
|
# hand.
|
||||||
x86_64-unknown-linux-gnu/
|
x86_64-unknown-linux-gnu/
|
||||||
|
|
||||||
# The build artifacts for the `compiler-rt` library for the target this
|
# The build artifacts for the `compiler-rt` library for the target that
|
||||||
# folder is under. The exact layout here will likely depend on the platform,
|
# this folder is under. The exact layout here will likely depend on the
|
||||||
# and this is also built with CMake so the build system is also likely
|
# platform, and this is also built with CMake, so the build system is
|
||||||
# different.
|
# also likely different.
|
||||||
compiler-rt/
|
compiler-rt/
|
||||||
build/
|
build/
|
||||||
|
|
||||||
|
@ -183,11 +183,11 @@ build/
|
||||||
llvm/
|
llvm/
|
||||||
|
|
||||||
# build folder (e.g. the platform-specific build system). Like with
|
# build folder (e.g. the platform-specific build system). Like with
|
||||||
# compiler-rt this is compiled with CMake
|
# compiler-rt, this is compiled with CMake
|
||||||
build/
|
build/
|
||||||
|
|
||||||
# Installation of LLVM. Note that we run the equivalent of 'make install'
|
# Installation of LLVM. Note that we run the equivalent of 'make install'
|
||||||
# for LLVM to setup these folders.
|
# for LLVM, to setup these folders.
|
||||||
bin/
|
bin/
|
||||||
lib/
|
lib/
|
||||||
include/
|
include/
|
||||||
|
@ -206,18 +206,18 @@ build/
|
||||||
|
|
||||||
# Location where the stage0 Cargo and Rust compiler are unpacked. This
|
# Location where the stage0 Cargo and Rust compiler are unpacked. This
|
||||||
# directory is purely an extracted and overlaid tarball of these two (done
|
# directory is purely an extracted and overlaid tarball of these two (done
|
||||||
# by the bootstrapy python script). In theory the build system does not
|
# by the bootstrap python script). In theory, the build system does not
|
||||||
# modify anything under this directory afterwards.
|
# modify anything under this directory afterwards.
|
||||||
stage0/
|
stage0/
|
||||||
|
|
||||||
# These to build directories are the cargo output directories for builds of
|
# These to-build directories are the cargo output directories for builds of
|
||||||
# the standard library and compiler, respectively. Internally these may also
|
# the standard library and compiler, respectively. Internally, these may also
|
||||||
# have other target directories, which represent artifacts being compiled
|
# have other target directories, which represent artifacts being compiled
|
||||||
# from the host to the specified target.
|
# from the host to the specified target.
|
||||||
#
|
#
|
||||||
# Essentially, each of these directories is filled in by one `cargo`
|
# Essentially, each of these directories is filled in by one `cargo`
|
||||||
# invocation. The build system instruments calling Cargo in the right order
|
# invocation. The build system instruments calling Cargo in the right order
|
||||||
# with the right variables to ensure these are filled in correctly.
|
# with the right variables to ensure that these are filled in correctly.
|
||||||
stageN-std/
|
stageN-std/
|
||||||
stageN-test/
|
stageN-test/
|
||||||
stageN-rustc/
|
stageN-rustc/
|
||||||
|
@ -232,8 +232,8 @@ build/
|
||||||
# being compiled (e.g. after libstd has been built), *this* is used as the
|
# being compiled (e.g. after libstd has been built), *this* is used as the
|
||||||
# sysroot for the stage0 compiler being run.
|
# sysroot for the stage0 compiler being run.
|
||||||
#
|
#
|
||||||
# Basically this directory is just a temporary artifact use to configure the
|
# Basically, this directory is just a temporary artifact used to configure the
|
||||||
# stage0 compiler to ensure that the libstd we just built is used to
|
# stage0 compiler to ensure that the libstd that we just built is used to
|
||||||
# compile the stage1 compiler.
|
# compile the stage1 compiler.
|
||||||
stage0-sysroot/lib/
|
stage0-sysroot/lib/
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@ build/
|
||||||
# system will link (using hard links) output from stageN-{std,rustc} into
|
# system will link (using hard links) output from stageN-{std,rustc} into
|
||||||
# each of these directories.
|
# each of these directories.
|
||||||
#
|
#
|
||||||
# In theory there is no extra build output in these directories.
|
# In theory, there is no extra build output in these directories.
|
||||||
stage1/
|
stage1/
|
||||||
stage2/
|
stage2/
|
||||||
stage3/
|
stage3/
|
||||||
|
@ -265,14 +265,14 @@ structure here serves two goals:
|
||||||
depend on `std`, so libstd is a separate project compiled ahead of time
|
depend on `std`, so libstd is a separate project compiled ahead of time
|
||||||
before the actual compiler builds.
|
before the actual compiler builds.
|
||||||
2. Splitting "host artifacts" from "target artifacts". That is, when building
|
2. Splitting "host artifacts" from "target artifacts". That is, when building
|
||||||
code for an arbitrary target you don't need the entire compiler, but you'll
|
code for an arbitrary target, you don't need the entire compiler, but you'll
|
||||||
end up needing libraries like libtest that depend on std but also want to use
|
end up needing libraries like libtest that depend on std but also want to use
|
||||||
crates.io dependencies. Hence, libtest is split out as its own project that
|
crates.io dependencies. Hence, libtest is split out as its own project that
|
||||||
is sequenced after `std` but before `rustc`. This project is built for all
|
is sequenced after `std` but before `rustc`. This project is built for all
|
||||||
targets.
|
targets.
|
||||||
|
|
||||||
There is some loss in build parallelism here because libtest can be compiled in
|
There is some loss in build parallelism here because libtest can be compiled in
|
||||||
parallel with a number of rustc artifacts, but in theory the loss isn't too bad!
|
parallel with a number of rustc artifacts, but in theory, the loss isn't too bad!
|
||||||
|
|
||||||
## Build tools
|
## Build tools
|
||||||
|
|
||||||
|
@ -285,13 +285,13 @@ appropriate libstd/libtest/librustc compile above.
|
||||||
|
|
||||||
## Extending rustbuild
|
## Extending rustbuild
|
||||||
|
|
||||||
So you'd like to add a feature to the rustbuild build system or just fix a bug.
|
So, you'd like to add a feature to the rustbuild build system or just fix a bug.
|
||||||
Great! One of the major motivational factors for moving away from `make` is that
|
Great! One of the major motivational factors for moving away from `make` is that
|
||||||
Rust is in theory much easier to read, modify, and write. If you find anything
|
Rust is in theory much easier to read, modify, and write. If you find anything
|
||||||
excessively confusing, please open an issue on this and we'll try to get it
|
excessively confusing, please open an issue on this, and we'll try to get it
|
||||||
documented or simplified pronto.
|
documented or simplified, pronto.
|
||||||
|
|
||||||
First up, you'll probably want to read over the documentation above as that'll
|
First up, you'll probably want to read over the documentation above, as that'll
|
||||||
give you a high level overview of what rustbuild is doing. You also probably
|
give you a high level overview of what rustbuild is doing. You also probably
|
||||||
want to play around a bit yourself by just getting it up and running before you
|
want to play around a bit yourself by just getting it up and running before you
|
||||||
dive too much into the actual build system itself.
|
dive too much into the actual build system itself.
|
||||||
|
@ -326,7 +326,7 @@ A 'major change' includes
|
||||||
Changes that do not affect contributors to the compiler or users
|
Changes that do not affect contributors to the compiler or users
|
||||||
building rustc from source don't need an update to `VERSION`.
|
building rustc from source don't need an update to `VERSION`.
|
||||||
|
|
||||||
If you have any questions feel free to reach out on the `#t-infra` channel in
|
If you have any questions, feel free to reach out on the `#t-infra` channel in
|
||||||
the [Rust Zulip server][rust-zulip] or ask on internals.rust-lang.org. When
|
the [Rust Zulip server][rust-zulip] or ask on internals.rust-lang.org. When
|
||||||
you encounter bugs, please file issues on the rust-lang/rust issue tracker.
|
you encounter bugs, please file issues on the rust-lang/rust issue tracker.
|
||||||
|
|
||||||
|
|
|
@ -829,10 +829,19 @@ impl Config {
|
||||||
let s = git_root.to_str().unwrap();
|
let s = git_root.to_str().unwrap();
|
||||||
|
|
||||||
// Bootstrap is quite bad at handling /? in front of paths
|
// Bootstrap is quite bad at handling /? in front of paths
|
||||||
config.src = match s.strip_prefix("\\\\?\\") {
|
let src = match s.strip_prefix("\\\\?\\") {
|
||||||
Some(p) => PathBuf::from(p),
|
Some(p) => PathBuf::from(p),
|
||||||
None => PathBuf::from(git_root),
|
None => PathBuf::from(git_root),
|
||||||
};
|
};
|
||||||
|
// If this doesn't have at least `stage0.json`, we guessed wrong. This can happen when,
|
||||||
|
// for example, the build directory is inside of another unrelated git directory.
|
||||||
|
// In that case keep the original `CARGO_MANIFEST_DIR` handling.
|
||||||
|
//
|
||||||
|
// NOTE: this implies that downloadable bootstrap isn't supported when the build directory is outside
|
||||||
|
// the source directory. We could fix that by setting a variable from all three of python, ./x, and x.ps1.
|
||||||
|
if src.join("src").join("stage0.json").exists() {
|
||||||
|
config.src = src;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// We're building from a tarball, not git sources.
|
// We're building from a tarball, not git sources.
|
||||||
// We don't support pre-downloaded bootstrap in this case.
|
// We don't support pre-downloaded bootstrap in this case.
|
||||||
|
|
|
@ -58,7 +58,6 @@ GDB_ARGS="--directory=\"$GDB_PYTHON_MODULE_DIRECTORY\" -iex \"add-auto-load-safe
|
||||||
# Finally we execute gdbgui.
|
# Finally we execute gdbgui.
|
||||||
PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" \
|
PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" \
|
||||||
exec ${RUST_GDBGUI} \
|
exec ${RUST_GDBGUI} \
|
||||||
--gdb ${RUST_GDB} \
|
--gdb-cmd "${RUST_GDB} ${GDB_ARGS}" \
|
||||||
--gdb-args "${GDB_ARGS}" \
|
|
||||||
"${@}"
|
"${@}"
|
||||||
|
|
||||||
|
|
|
@ -400,7 +400,7 @@ fn item_module(w: &mut Buffer, cx: &mut Context<'_>, item: &clean::Item, items:
|
||||||
if myitem.fn_header(cx.tcx()).unwrap().unsafety
|
if myitem.fn_header(cx.tcx()).unwrap().unsafety
|
||||||
== hir::Unsafety::Unsafe =>
|
== hir::Unsafety::Unsafe =>
|
||||||
{
|
{
|
||||||
"<a title=\"unsafe function\" href=\"#\"><sup>⚠</sup></a>"
|
"<sup title=\"unsafe function\">⚠</sup>"
|
||||||
}
|
}
|
||||||
_ => "",
|
_ => "",
|
||||||
};
|
};
|
||||||
|
|
|
@ -1801,10 +1801,6 @@ in storage.js plus the media query with (min-width: 701px)
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.source .mobile-topbar {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar-menu-toggle {
|
.sidebar-menu-toggle {
|
||||||
width: 45px;
|
width: 45px;
|
||||||
/* Rare exception to specifying font sizes in rem. Since this is acting
|
/* Rare exception to specifying font sizes in rem. Since this is acting
|
||||||
|
|
|
@ -735,14 +735,15 @@ function loadCss(cssFileName) {
|
||||||
let oldSidebarScrollPosition = null;
|
let oldSidebarScrollPosition = null;
|
||||||
|
|
||||||
function showSidebar() {
|
function showSidebar() {
|
||||||
if (window.innerWidth < window.RUSTDOC_MOBILE_BREAKPOINT) {
|
const mobile_topbar = document.querySelector(".mobile-topbar");
|
||||||
|
if (window.innerWidth < window.RUSTDOC_MOBILE_BREAKPOINT && mobile_topbar) {
|
||||||
// This is to keep the scroll position on mobile.
|
// This is to keep the scroll position on mobile.
|
||||||
oldSidebarScrollPosition = window.scrollY;
|
oldSidebarScrollPosition = window.scrollY;
|
||||||
document.body.style.width = `${document.body.offsetWidth}px`;
|
document.body.style.width = `${document.body.offsetWidth}px`;
|
||||||
document.body.style.position = "fixed";
|
document.body.style.position = "fixed";
|
||||||
document.body.style.top = `-${oldSidebarScrollPosition}px`;
|
document.body.style.top = `-${oldSidebarScrollPosition}px`;
|
||||||
document.querySelector(".mobile-topbar").style.top = `${oldSidebarScrollPosition}px`;
|
mobile_topbar.style.top = `${oldSidebarScrollPosition}px`;
|
||||||
document.querySelector(".mobile-topbar").style.position = "relative";
|
mobile_topbar.style.position = "relative";
|
||||||
} else {
|
} else {
|
||||||
oldSidebarScrollPosition = null;
|
oldSidebarScrollPosition = null;
|
||||||
}
|
}
|
||||||
|
@ -751,13 +752,14 @@ function loadCss(cssFileName) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideSidebar() {
|
function hideSidebar() {
|
||||||
if (oldSidebarScrollPosition !== null) {
|
const mobile_topbar = document.querySelector(".mobile-topbar");
|
||||||
|
if (oldSidebarScrollPosition !== null && mobile_topbar) {
|
||||||
// This is to keep the scroll position on mobile.
|
// This is to keep the scroll position on mobile.
|
||||||
document.body.style.width = "";
|
document.body.style.width = "";
|
||||||
document.body.style.position = "";
|
document.body.style.position = "";
|
||||||
document.body.style.top = "";
|
document.body.style.top = "";
|
||||||
document.querySelector(".mobile-topbar").style.top = "";
|
mobile_topbar.style.top = "";
|
||||||
document.querySelector(".mobile-topbar").style.position = "";
|
mobile_topbar.style.position = "";
|
||||||
// The scroll position is lost when resetting the style, hence why we store it in
|
// The scroll position is lost when resetting the style, hence why we store it in
|
||||||
// `oldSidebarScrollPosition`.
|
// `oldSidebarScrollPosition`.
|
||||||
window.scrollTo(0, oldSidebarScrollPosition);
|
window.scrollTo(0, oldSidebarScrollPosition);
|
||||||
|
|
|
@ -73,6 +73,7 @@
|
||||||
</div> {#- -#}
|
</div> {#- -#}
|
||||||
<![endif]--> {#- -#}
|
<![endif]--> {#- -#}
|
||||||
{{- layout.external_html.before_content|safe -}}
|
{{- layout.external_html.before_content|safe -}}
|
||||||
|
{%- if page.css_class != "source" -%}
|
||||||
<nav class="mobile-topbar"> {#- -#}
|
<nav class="mobile-topbar"> {#- -#}
|
||||||
<button class="sidebar-menu-toggle">☰</button> {#- -#}
|
<button class="sidebar-menu-toggle">☰</button> {#- -#}
|
||||||
<a class="sidebar-logo" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#}
|
<a class="sidebar-logo" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#}
|
||||||
|
@ -86,6 +87,7 @@
|
||||||
</a> {#- -#}
|
</a> {#- -#}
|
||||||
<h2 class="location"></h2> {#- -#}
|
<h2 class="location"></h2> {#- -#}
|
||||||
</nav> {#- -#}
|
</nav> {#- -#}
|
||||||
|
{%- endif -%}
|
||||||
<nav class="sidebar"> {#- -#}
|
<nav class="sidebar"> {#- -#}
|
||||||
<a class="sidebar-logo" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#}
|
<a class="sidebar-logo" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#}
|
||||||
<div class="logo-container"> {#- -#}
|
<div class="logo-container"> {#- -#}
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
# ignore-riscv64 $(call RUN,foo) expects to run the target executable natively
|
# ignore-cross-compile $(call RUN,foo) expects to run the target executable natively
|
||||||
# so it won't work with remote-test-server
|
# so it won't work with remote-test-server
|
||||||
# ignore-arm Another build using remote-test-server
|
|
||||||
# ignore-none no-std is not supported
|
# ignore-none no-std is not supported
|
||||||
# ignore-wasm32 FIXME: don't attempt to compile C++ to WASM
|
|
||||||
# ignore-wasm64 FIXME: don't attempt to compile C++ to WASM
|
|
||||||
# ignore-nvptx64-nvidia-cuda FIXME: can't find crate for `std`
|
|
||||||
# ignore-musl FIXME: this makefile needs teaching how to use a musl toolchain
|
# ignore-musl FIXME: this makefile needs teaching how to use a musl toolchain
|
||||||
# (see dist-i586-gnu-i586-i686-musl Dockerfile)
|
# (see dist-i586-gnu-i586-i686-musl Dockerfile)
|
||||||
|
|
||||||
|
|
|
@ -42,4 +42,4 @@ assert-false: ".source-sidebar-expanded"
|
||||||
assert: "nav.sidebar"
|
assert: "nav.sidebar"
|
||||||
|
|
||||||
// Check that the topbar is not visible
|
// Check that the topbar is not visible
|
||||||
assert-property: (".mobile-topbar", {"offsetParent": "null"})
|
assert-false: ".mobile-topbar"
|
||||||
|
|
|
@ -367,3 +367,7 @@ impl TypeWithNoDocblocks {
|
||||||
pub fn first_fn(&self) {}
|
pub fn first_fn(&self) {}
|
||||||
pub fn second_fn(&self) {}
|
pub fn second_fn(&self) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub unsafe fn unsafe_fn() {}
|
||||||
|
|
||||||
|
pub fn safe_fn() {}
|
||||||
|
|
37
src/test/rustdoc-gui/unsafe-fn.goml
Normal file
37
src/test/rustdoc-gui/unsafe-fn.goml
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
|
||||||
|
|
||||||
|
compare-elements-property: (
|
||||||
|
"//a[@title='test_docs::safe_fn fn']/..",
|
||||||
|
"//a[@title='test_docs::unsafe_fn fn']/..",
|
||||||
|
["clientHeight"]
|
||||||
|
)
|
||||||
|
|
||||||
|
// If the text isn't displayed, the browser doesn't compute color style correctly...
|
||||||
|
show-text: true
|
||||||
|
|
||||||
|
// Set the theme to dark.
|
||||||
|
local-storage: {"rustdoc-theme": "dark", "rustdoc-preferred-dark-theme": "dark", "rustdoc-use-system-theme": "false"}
|
||||||
|
// We reload the page so the local storage settings are being used.
|
||||||
|
reload:
|
||||||
|
|
||||||
|
assert-css: (".item-left sup", {
|
||||||
|
"color": "rgb(221, 221, 221)"
|
||||||
|
})
|
||||||
|
|
||||||
|
// Set the theme to ayu.
|
||||||
|
local-storage: {"rustdoc-theme": "ayu", "rustdoc-preferred-dark-theme": "ayu", "rustdoc-use-system-theme": "false"}
|
||||||
|
// We reload the page so the local storage settings are being used.
|
||||||
|
reload:
|
||||||
|
|
||||||
|
assert-css: (".item-left sup", {
|
||||||
|
"color": "rgb(197, 197, 197)"
|
||||||
|
})
|
||||||
|
|
||||||
|
// Set the theme to light.
|
||||||
|
local-storage: {"rustdoc-theme": "light", "rustdoc-preferred-dark-theme": "light", "rustdoc-use-system-theme": "false"}
|
||||||
|
// We reload the page so the local storage settings are being used.
|
||||||
|
reload:
|
||||||
|
|
||||||
|
assert-css: (".item-left sup", {
|
||||||
|
"color": "rgb(0, 0, 0)"
|
||||||
|
})
|
Loading…
Add table
Add a link
Reference in a new issue