From 8968c0e48f460d042f20d79aa0ff8ef6b317f086 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 22 May 2021 16:41:26 +0200 Subject: Add test for search result resize width --- src/test/rustdoc-gui/search-result-display.goml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/test/rustdoc-gui/search-result-display.goml (limited to 'src/test') diff --git a/src/test/rustdoc-gui/search-result-display.goml b/src/test/rustdoc-gui/search-result-display.goml new file mode 100644 index 00000000000..96d15c624f1 --- /dev/null +++ b/src/test/rustdoc-gui/search-result-display.goml @@ -0,0 +1,12 @@ +goto: file://|DOC_PATH|/test_docs/index.html +size: (900, 1000) +write: (".search-input", "test") +// Waiting for the search results to appear... +wait-for: "#titles" +// The width is returned by "getComputedStyle" which returns the exact number instead of the +// CSS rule which is "50%"... +assert: (".search-results div.desc", {"width": "320px"}) +size: (600, 100) +// As counter-intuitive as it may seem, in this width, the width is "100%", which is why +// when computed it's larger. +assert: (".search-results div.desc", {"width": "570px"}) -- cgit 1.4.1-3-g733a5 From 3559565e071c043f48c95a709d6b521e6efe7757 Mon Sep 17 00:00:00 2001 From: LeSeulArtichaut Date: Mon, 24 May 2021 12:59:33 +0200 Subject: Replace more "NULL" with "null" --- compiler/rustc_mir_build/src/check_unsafety.rs | 2 +- src/test/ui/generator/issue-45729-unsafe-in-generator.thir.stderr | 2 +- src/test/ui/issues/issue-47412.thir.stderr | 2 +- src/test/ui/traits/safety-fn-body.thir.stderr | 2 +- src/test/ui/unsafe/issue-45087-unreachable-unsafe.thir.stderr | 2 +- src/test/ui/unsafe/unsafe-fn-assign-deref-ptr.thir.stderr | 2 +- src/test/ui/unsafe/unsafe-fn-deref-ptr.thir.stderr | 2 +- src/test/ui/unsafe/unsafe-unstable-const-fn.thir.stderr | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/test') diff --git a/compiler/rustc_mir_build/src/check_unsafety.rs b/compiler/rustc_mir_build/src/check_unsafety.rs index aa8193dab5d..0aa4d0fe2cb 100644 --- a/compiler/rustc_mir_build/src/check_unsafety.rs +++ b/compiler/rustc_mir_build/src/check_unsafety.rs @@ -296,7 +296,7 @@ impl UnsafeOpKind { ), DerefOfRawPointer => ( "dereference of raw pointer", - "raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules \ + "raw pointers may be null, dangling or unaligned; they can violate aliasing rules \ and cause data races: all of these are undefined behavior", ), AssignToDroppingUnionField => ( diff --git a/src/test/ui/generator/issue-45729-unsafe-in-generator.thir.stderr b/src/test/ui/generator/issue-45729-unsafe-in-generator.thir.stderr index a0905f98ca7..10d768f19fc 100644 --- a/src/test/ui/generator/issue-45729-unsafe-in-generator.thir.stderr +++ b/src/test/ui/generator/issue-45729-unsafe-in-generator.thir.stderr @@ -4,7 +4,7 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function LL | *(1 as *mut u32) = 42; | ^^^^^^^^^^^^^^^^ dereference of raw pointer | - = note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior + = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior error: aborting due to previous error diff --git a/src/test/ui/issues/issue-47412.thir.stderr b/src/test/ui/issues/issue-47412.thir.stderr index 2d6004b7911..66a0cfcd710 100644 --- a/src/test/ui/issues/issue-47412.thir.stderr +++ b/src/test/ui/issues/issue-47412.thir.stderr @@ -4,7 +4,7 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function LL | match *ptr {} | ^^^^ dereference of raw pointer | - = note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior + = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior error: aborting due to previous error diff --git a/src/test/ui/traits/safety-fn-body.thir.stderr b/src/test/ui/traits/safety-fn-body.thir.stderr index 94a1a2a03cd..23696c32bef 100644 --- a/src/test/ui/traits/safety-fn-body.thir.stderr +++ b/src/test/ui/traits/safety-fn-body.thir.stderr @@ -4,7 +4,7 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function LL | *self += 1; | ^^^^^ dereference of raw pointer | - = note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior + = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior error: aborting due to previous error diff --git a/src/test/ui/unsafe/issue-45087-unreachable-unsafe.thir.stderr b/src/test/ui/unsafe/issue-45087-unreachable-unsafe.thir.stderr index b89401ce837..73a113652b8 100644 --- a/src/test/ui/unsafe/issue-45087-unreachable-unsafe.thir.stderr +++ b/src/test/ui/unsafe/issue-45087-unreachable-unsafe.thir.stderr @@ -4,7 +4,7 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function LL | *(1 as *mut u32) = 42; | ^^^^^^^^^^^^^^^^ dereference of raw pointer | - = note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior + = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior error: aborting due to previous error diff --git a/src/test/ui/unsafe/unsafe-fn-assign-deref-ptr.thir.stderr b/src/test/ui/unsafe/unsafe-fn-assign-deref-ptr.thir.stderr index 498d26d30ff..bbe4a415b5e 100644 --- a/src/test/ui/unsafe/unsafe-fn-assign-deref-ptr.thir.stderr +++ b/src/test/ui/unsafe/unsafe-fn-assign-deref-ptr.thir.stderr @@ -4,7 +4,7 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function LL | *p = 0; | ^^ dereference of raw pointer | - = note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior + = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior error: aborting due to previous error diff --git a/src/test/ui/unsafe/unsafe-fn-deref-ptr.thir.stderr b/src/test/ui/unsafe/unsafe-fn-deref-ptr.thir.stderr index 6897e4e691a..a2614992445 100644 --- a/src/test/ui/unsafe/unsafe-fn-deref-ptr.thir.stderr +++ b/src/test/ui/unsafe/unsafe-fn-deref-ptr.thir.stderr @@ -4,7 +4,7 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function LL | return *p; | ^^ dereference of raw pointer | - = note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior + = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior error: aborting due to previous error diff --git a/src/test/ui/unsafe/unsafe-unstable-const-fn.thir.stderr b/src/test/ui/unsafe/unsafe-unstable-const-fn.thir.stderr index 49d6a96860b..99808495ea6 100644 --- a/src/test/ui/unsafe/unsafe-unstable-const-fn.thir.stderr +++ b/src/test/ui/unsafe/unsafe-unstable-const-fn.thir.stderr @@ -4,7 +4,7 @@ error[E0133]: dereference of raw pointer is unsafe and requires unsafe function LL | *a == b | ^^ dereference of raw pointer | - = note: raw pointers may be NULL, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior + = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior error: aborting due to previous error -- cgit 1.4.1-3-g733a5