Open Bug 1563876 Opened 6 years ago Updated 3 years ago

--enable-warnings-as-errors fails due to -D deprecated with Rust 1.38

Categories

(Core :: CSS Parsing and Computation, defect, P3)

defect

Tracking

()

Tracking Status
firefox69 --- affected

People

(Reporter: jbeich, Unassigned)

References

(Depends on 1 open bug)

Details

Regressed by https://github.com/rust-lang/rust/pull/60445

$ rustc -vV
rustc 1.38.0-nightly
binary: rustc
commit-hash: 481068a70767
commit-date: 2019-07-05
host: x86_64-unknown-freebsd
release: 1.38.0-nightly
LLVM version: 8.0

$ echo "ac_add_options --enable-warnings-as-errors" >>.mozconfig
$ ./mach build
[...]
error: use of deprecated item 'std::mem::uninitialized': use `mem::MaybeUninit` instead
   --> servo/components/servo_arc/lib.rs:65:35
    |
65  |         let invalid: $container = ::std::mem::uninitialized();
    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^
...
226 |         let ptr = (ptr as *const u8).offset(-offset_of!(ArcInner<T>, data));
    |                                              ----------------------------- in this macro invocation
    |
    = note: `-D deprecated` implied by `-D warnings`
error: use of deprecated item 'std::mem::uninitialized': use `mem::MaybeUninit` instead
   --> servo/components/to_shmem/lib.rs:415:37
    |
415 |                 let mut inline: A = mem::uninitialized();
    |                                     ^^^^^^^^^^^^^^^^^^
    |
    = note: `-D deprecated` implied by `-D warnings`
error: use of deprecated item 'std::mem::uninitialized': use `mem::MaybeUninit` instead
    --> servo/components/selectors/parser.rs:1934:8
     |
1934 |       Ok(match_ignore_ascii_case! {
     |  ________^
1935 | |         ident,
1936 | |         "i" => AttributeFlags::AsciiCaseInsensitive,
1937 | |         "s" => AttributeFlags::CaseSensitive,
1938 | |         _ => return Err(location.new_basic_unexpected_token_error(token.clone())),
1939 | |     })
     | |_____^
     |
     = note: `-D deprecated` implied by `-D warnings`
     = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error: use of deprecated item 'std::mem::uninitialized': use `mem::MaybeUninit` instead
    --> servo/components/selectors/parser.rs:2074:5
     |
2074 | /     match_ignore_ascii_case! { &name,
2075 | |         "nth-child" => return Ok(parse_nth_pseudo_class(input, Component::NthChild)?),
2076 | |         "nth-of-type" => return Ok(parse_nth_pseudo_class(input, Component::NthOfType)?),
2077 | |         "nth-last-child" => return Ok(parse_nth_pseudo_class(input, Component::NthLastChild)?),
...    |
2089 | |         _ => {}
2090 | |     }
     | |_____^
     |
     = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error: use of deprecated item 'std::mem::uninitialized': use `mem::MaybeUninit` instead
    --> servo/components/selectors/parser.rs:2111:5
     |
2111 | /     match_ignore_ascii_case! { name,
2112 | |         "before" | "after" | "first-line" | "first-letter" => true,
2113 | |         _ => false,
2114 | |     }
     | |_____^
     |
     = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error: use of deprecated item 'std::mem::uninitialized': use `mem::MaybeUninit` instead
    --> servo/components/selectors/parser.rs:2258:9
     |
2258 | /         match_ignore_ascii_case! { &name,
2259 | |             "first-child" => return Ok(Component::FirstChild),
2260 | |             "last-child" => return Ok(Component::LastChild),
2261 | |             "only-child" => return Ok(Component::OnlyChild),
...    |
2269 | |             _ => {},
2270 | |         }
     | |_________^
     |
     = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error: use of deprecated item 'std::mem::uninitialized': use `mem::MaybeUninit` instead
  --> servo/components/style_traits/viewport.rs:12:1
   |
12 | / define_css_keyword_enum! {
13 | |     pub enum UserZoom {
14 | |         Zoom = "zoom",
15 | |         Fixed = "fixed",
16 | |     }
17 | | }
   | |_^ in this macro invocation
   |
   = note: `-D deprecated` implied by `-D warnings`
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error: use of deprecated item 'std::mem::uninitialized': use `mem::MaybeUninit` instead
  --> servo/components/style_traits/viewport.rs:19:1
   |
19 | / define_css_keyword_enum! {
20 | |     pub enum Orientation {
21 | |         Auto = "auto",
22 | |         Portrait = "portrait",
23 | |         Landscape = "landscape",
24 | |     }
25 | | }
   | |_^ in this macro invocation
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error: aborting due to previous error
error: Could not compile `servo_arc`.
Depends on: 1563623

Assign the same priority as Bug 1563623.

Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.