Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove potential cfgs duplicates #66959

Merged
merged 1 commit into from
Dec 6, 2019

Conversation

GuillaumeGomez
Copy link
Member

Fixes #66921.

Before going any further (the issue seems to be linked to metadata as far as I can tell). Do you think this is the good place to do it or should it be done before?

r? @eddyb

i += 1;
}
s
}
Copy link
Member

@eddyb eddyb Dec 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this algorithm and suspect it's not correct (dedup_by_key is dedup but it compares something other than the value itself, in your case it dedups consecutive values which are both true or both false in the result of your closure).

I suspect you meant retain instead of dedup_by_key. However, it's still quadratic.

If you don't care about the order, you can use v.sort(); v.dedup();.
If you care about the order, you can use something more like this:

let mut seen = FxHashSet::new();
v.retain(|x| seen.insert(x));

Or since you start from a slice:

let mut seen = FxHashSet::new();
s.iter().filter(|x| seen.insert(x)).collect()

None of the above suggestions is quadratic, and they're all simpler.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't want to change the order but if you're fine with it then so be it! (it'll make the code simpler so yeay! \o/)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't want to change the order

I provided one example that changes the order and two that don't. The last one is probably what you should use.

Note that I'm only using the FxHashSet to check if the value has been seen already, but the set isn't iterated afterward, so the original order is kept.

@eddyb
Copy link
Member

eddyb commented Dec 2, 2019

the issue seems to be linked to metadata as far as I can tell

Not sure what you mean by "metadata".

It's possible there are --cfg duplicates on the command-line, I don't think we explicitly filter any of them out. cc @petrochenkov

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-12-02T13:14:21.5812950Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-02T13:14:22.1448615Z ##[command]git config gc.auto 0
2019-12-02T13:14:22.1455076Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-02T13:14:22.1458857Z ##[command]git config --get-all http.proxy
2019-12-02T13:14:22.1465941Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66959/merge:refs/remotes/pull/66959/merge
---
2019-12-02T14:17:03.2920408Z .................................................................................................... 1600/9319
2019-12-02T14:17:08.0657745Z .................................................................................................... 1700/9319
2019-12-02T14:17:21.1568970Z ........................................i........................................................... 1800/9319
2019-12-02T14:17:29.4657530Z .................................................................................................... 1900/9319
2019-12-02T14:17:44.0602004Z .........................iiiii...................................................................... 2000/9319
2019-12-02T14:17:54.5289774Z .................................................................................................... 2200/9319
2019-12-02T14:17:57.1687811Z .................................................................................................... 2300/9319
2019-12-02T14:18:01.9754244Z .................................................................................................... 2400/9319
2019-12-02T14:18:25.1569942Z .................................................................................................... 2500/9319
---
2019-12-02T14:21:14.1104278Z ..........................i...............i......................................................... 4800/9319
2019-12-02T14:21:25.4098920Z .................................................................................................... 4900/9319
2019-12-02T14:21:32.3526551Z .................................................................................................... 5000/9319
2019-12-02T14:21:40.9038351Z .................................................................................................... 5100/9319
2019-12-02T14:21:48.9017751Z ................................ii.ii...........i................................................... 5200/9319
2019-12-02T14:21:58.8080004Z .................................................................................................... 5400/9319
2019-12-02T14:22:09.5727996Z .................................................................................................... 5500/9319
2019-12-02T14:22:17.0387340Z ..............i..................................................................................... 5600/9319
2019-12-02T14:22:23.5880671Z .................................................................................................... 5700/9319
2019-12-02T14:22:23.5880671Z .................................................................................................... 5700/9319
2019-12-02T14:22:35.5169600Z .................................................................................................... 5800/9319
2019-12-02T14:22:48.6061590Z ii...i..ii...........i.............................................................................. 5900/9319
2019-12-02T14:23:08.1587104Z .................................................................................................... 6100/9319
2019-12-02T14:23:14.3356675Z .................................................................................................... 6200/9319
2019-12-02T14:23:14.3356675Z .................................................................................................... 6200/9319
2019-12-02T14:23:28.9330915Z .......................i..ii........................................................................ 6300/9319
2019-12-02T14:23:50.7407935Z ..............................................................................................i..... 6500/9319
2019-12-02T14:23:53.1608875Z .................................................................................................... 6600/9319
2019-12-02T14:23:55.5803166Z .....................................................................................i.............. 6700/9319
2019-12-02T14:23:58.4823537Z .................................................................................................... 6800/9319
---
2019-12-02T14:29:30.8955289Z  finished in 6.374
2019-12-02T14:29:30.8955960Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-02T14:29:30.8956031Z 
2019-12-02T14:29:30.8956078Z running 164 tests
2019-12-02T14:29:33.6323409Z iiii....iii......iii..iiii...i.............................i..i..................i....i...........ii 100/164
2019-12-02T14:29:35.6614364Z .i.i..iiii..iiiiiii............i.........iii.i..........ii......
2019-12-02T14:29:35.6615958Z 
2019-12-02T14:29:35.6619415Z  finished in 5.265
2019-12-02T14:29:35.6819101Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-02T14:29:35.8591026Z 
---
2019-12-02T14:29:38.8908099Z  finished in 2.274
2019-12-02T14:29:38.8952579Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-02T14:29:38.8952951Z 
2019-12-02T14:29:38.8953087Z running 9 tests
2019-12-02T14:29:38.8953485Z iiiiiiiii
2019-12-02T14:29:38.8954206Z 
2019-12-02T14:29:38.8954604Z  finished in 0.166
2019-12-02T14:29:38.8955035Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-02T14:29:38.8955078Z 
---
2019-12-02T14:29:59.4023436Z  finished in 20.496
2019-12-02T14:29:59.4024315Z Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-02T14:29:59.4024373Z 
2019-12-02T14:29:59.4024422Z running 124 tests
2019-12-02T14:30:24.5526854Z .iiiii...i.....i..i...i..i.i.i..i.ii..i.i.....i..i....ii..........iiii..........i....ii...i.......ii 100/124
2019-12-02T14:30:29.8487467Z .i.i.i......iii.i.....ii
2019-12-02T14:30:29.8488915Z 
2019-12-02T14:30:29.8489129Z  finished in 31.167
2019-12-02T14:30:29.8499233Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-02T14:30:29.8499823Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2019-12-02T14:42:53.8818980Z 
2019-12-02T14:42:53.8820304Z    Doc-tests core
2019-12-02T14:42:59.2213282Z 
2019-12-02T14:42:59.2214263Z running 2432 tests
2019-12-02T14:43:10.2950282Z ......iiiii......................................................................................... 100/2432
2019-12-02T14:43:33.9350355Z .................................................................................................... 300/2432
2019-12-02T14:43:47.0116850Z ..i................................................................................................. 400/2432
2019-12-02T14:43:47.0116850Z ..i................................................................................................. 400/2432
2019-12-02T14:43:57.6636132Z ..................................................i..i..................iiii........................ 500/2432
2019-12-02T14:44:17.6004323Z .................................................................................................... 700/2432
2019-12-02T14:44:28.3399305Z .................................................................................................... 800/2432
2019-12-02T14:44:39.1668551Z .................................................................................................... 900/2432
2019-12-02T14:44:50.2527333Z .................................................................................................... 1000/2432
---
2019-12-02T14:49:12.8202156Z 
2019-12-02T14:49:12.8202459Z running 999 tests
2019-12-02T14:49:32.7919862Z i................................................................................................... 100/999
2019-12-02T14:49:44.0696212Z .................................................................................................... 200/999
2019-12-02T14:49:52.1361972Z ..................iii......i......i...i......i...................................................... 300/999
2019-12-02T14:49:57.6428059Z .................................................................................................... 400/999
2019-12-02T14:50:05.4662761Z ..........................................i..i.................................ii................... 500/999
2019-12-02T14:50:20.3575230Z .................................................................................................... 700/999
2019-12-02T14:50:20.3575230Z .................................................................................................... 700/999
2019-12-02T14:50:28.1577939Z .........................iiii....................................................................... 800/999
2019-12-02T14:50:43.5797646Z .................................................................................................... 900/999
2019-12-02T14:50:51.2669755Z ...............................................iiii................................................
2019-12-02T14:50:51.2678390Z 
2019-12-02T14:50:51.2798643Z  finished in 197.331
2019-12-02T14:50:51.2811409Z Testing term stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-02T14:50:51.5547358Z    Compiling term v0.0.0 (/checkout/src/libterm)
---
2019-12-02T14:59:08.7458205Z running 44 tests
2019-12-02T14:59:08.7552824Z .....FF.....................................
2019-12-02T14:59:08.7553403Z failures:
2019-12-02T14:59:08.7553616Z 
2019-12-02T14:59:08.7557214Z ---- clean::cfg::tests::test_render_long_html stdout ----
2019-12-02T14:59:08.7557643Z thread 'clean::cfg::tests::test_render_long_html' panicked at 'assertion failed: `(left == right)`
2019-12-02T14:59:08.7557708Z   left: `"This is supported on <strong>Unix and Windows</strong> only."`,
2019-12-02T14:59:08.7558412Z  right: `"This is supported on <strong>Unix and Windows and debug-assertions enabled</strong> only."`', src/librustdoc/clean/cfg/tests.rs:359:9
2019-12-02T14:59:08.7558552Z 
2019-12-02T14:59:08.7558795Z ---- clean::cfg::tests::test_render_short_html stdout ----
2019-12-02T14:59:08.7558795Z ---- clean::cfg::tests::test_render_short_html stdout ----
2019-12-02T14:59:08.7559093Z thread 'clean::cfg::tests::test_render_short_html' panicked at 'assertion failed: `(left == right)`
2019-12-02T14:59:08.7559148Z   left: `"Unix and Windows"`,
2019-12-02T14:59:08.7559423Z  right: `"Unix and Windows and debug-assertions enabled"`', src/librustdoc/clean/cfg/tests.rs:279:9
2019-12-02T14:59:08.7559503Z 
2019-12-02T14:59:08.7559544Z failures:
2019-12-02T14:59:08.7559590Z     clean::cfg::tests::test_render_long_html
2019-12-02T14:59:08.7559655Z     clean::cfg::tests::test_render_short_html
2019-12-02T14:59:08.7559655Z     clean::cfg::tests::test_render_short_html
2019-12-02T14:59:08.7559685Z 
2019-12-02T14:59:08.7559965Z test result: FAILED. 42 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out
2019-12-02T14:59:08.7560011Z 
2019-12-02T14:59:08.7578321Z error: test failed, to rerun pass '-p rustdoc --lib'
2019-12-02T14:59:08.7603154Z 
2019-12-02T14:59:08.7603154Z 
2019-12-02T14:59:08.7604127Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "-Zconfig-profile" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "2" "--release" "--locked" "--color" "always" "--manifest-path" "/checkout/src/tools/rustdoc/Cargo.toml" "-p" "rustdoc:0.0.0" "--" "--quiet"
2019-12-02T14:59:08.7604519Z 
2019-12-02T14:59:08.7604635Z 
2019-12-02T14:59:08.7607190Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-12-02T14:59:08.7607639Z Build completed unsuccessfully in 1:38:24
2019-12-02T14:59:08.7607639Z Build completed unsuccessfully in 1:38:24
2019-12-02T14:59:08.7664833Z == clock drift check ==
2019-12-02T14:59:08.7702083Z   local time: Mon Dec  2 14:59:08 UTC 2019
2019-12-02T14:59:09.0542831Z   network time: Mon, 02 Dec 2019 14:59:09 GMT
2019-12-02T14:59:09.0543548Z == end clock drift check ==
2019-12-02T14:59:10.2919751Z 
2019-12-02T14:59:10.3026987Z ##[error]Bash exited with code '1'.
2019-12-02T14:59:10.3067192Z ##[section]Starting: Checkout
2019-12-02T14:59:10.3069925Z ==============================================================================
2019-12-02T14:59:10.3069981Z Task         : Get sources
2019-12-02T14:59:10.3070049Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@ollie27
Copy link
Member

ollie27 commented Dec 2, 2019

Here's a small test case where both Foo and Bar have the duplicate cfgs displayed:

#![feature(doc_cfg)]

#[doc(cfg(feature = "sync"))]
#[doc(cfg(feature = "sync"))]
pub struct Foo;

#[doc(cfg(feature = "sync"))]
pub mod bar {
    #[doc(cfg(feature = "sync"))]
    pub struct Bar;
}

The de-duplication needs to happen in the BitAndAssign and BitOrAssign impls for Cfg. That could be handled in the impls themselves to preserve ordering or by using BTreeSets instead of Vecs here:

/// Union of a list of configuration requirements, i.e., `any(...)`.
Any(Vec<Cfg>),
/// Intersection of a list of configuration requirements, i.e., `all(...)`.
All(Vec<Cfg>),

@Dylan-DPC-zz Dylan-DPC-zz added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Dec 3, 2019
@eddyb
Copy link
Member

eddyb commented Dec 3, 2019

r=me after removing [WIP] from title.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-12-03T17:08:55.3943389Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-03T17:08:55.4143816Z ##[command]git config gc.auto 0
2019-12-03T17:08:55.4224315Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-03T17:08:55.4264790Z ##[command]git config --get-all http.proxy
2019-12-03T17:08:55.4425188Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66959/merge:refs/remotes/pull/66959/merge
---
2019-12-03T18:10:30.1502436Z .................................................................................................... 1600/9321
2019-12-03T18:10:34.9307736Z .................................................................................................... 1700/9321
2019-12-03T18:10:48.1058475Z ........................................i........................................................... 1800/9321
2019-12-03T18:10:56.4654205Z .................................................................................................... 1900/9321
2019-12-03T18:11:10.7064278Z .........................iiiii...................................................................... 2000/9321
2019-12-03T18:11:21.2235956Z .................................................................................................... 2200/9321
2019-12-03T18:11:23.8601131Z .................................................................................................... 2300/9321
2019-12-03T18:11:28.5831979Z .................................................................................................... 2400/9321
2019-12-03T18:11:51.1696444Z .................................................................................................... 2500/9321
---
2019-12-03T18:14:35.7413262Z ..........................i...............i......................................................... 4800/9321
2019-12-03T18:14:46.6962858Z .................................................................................................... 4900/9321
2019-12-03T18:14:52.8870683Z .................................................................................................... 5000/9321
2019-12-03T18:15:01.2269233Z .................................................................................................... 5100/9321
2019-12-03T18:15:09.0431596Z ................................ii.ii...........i................................................... 5200/9321
2019-12-03T18:15:18.7504990Z .................................................................................................... 5400/9321
2019-12-03T18:15:29.3405710Z .................................................................................................... 5500/9321
2019-12-03T18:15:36.6495803Z ..............i..................................................................................... 5600/9321
2019-12-03T18:15:43.3157502Z .................................................................................................... 5700/9321
2019-12-03T18:15:43.3157502Z .................................................................................................... 5700/9321
2019-12-03T18:15:54.9990523Z .................................................................................................... 5800/9321
2019-12-03T18:16:07.4449363Z ii...i..ii...........i.............................................................................. 5900/9321
2019-12-03T18:16:26.4985335Z .................................................................................................... 6100/9321
2019-12-03T18:16:34.4877523Z .................................................................................................... 6200/9321
2019-12-03T18:16:34.4877523Z .................................................................................................... 6200/9321
2019-12-03T18:16:49.1292360Z .......................i..ii........................................................................ 6300/9321
2019-12-03T18:17:09.7390972Z ...............................................................................................i.... 6500/9321
2019-12-03T18:17:12.0595580Z .................................................................................................... 6600/9321
2019-12-03T18:17:14.3970728Z ......................................................................................i............. 6700/9321
2019-12-03T18:17:17.2144651Z .................................................................................................... 6800/9321
---
2019-12-03T18:18:56.4905542Z .................................................................................................... 7300/9321
2019-12-03T18:19:01.6273277Z .................................................................................................... 7400/9321
2019-12-03T18:19:07.4414413Z .................................................................................................... 7500/9321
2019-12-03T18:19:13.9056352Z .................................................................................................... 7600/9321
2019-12-03T18:19:25.4299229Z ...................................................................................................i 7700/9321
2019-12-03T18:19:32.4356199Z iii................................................................................................. 7800/9321
2019-12-03T18:19:42.0762315Z .............................ii......i.............................................................. 7900/9321
2019-12-03T18:19:59.4976517Z .................................................................................................... 8100/9321
2019-12-03T18:20:11.9987270Z .................................................................................................... 8200/9321
2019-12-03T18:20:18.7050699Z .................................................................................................... 8300/9321
2019-12-03T18:20:44.2757102Z .................................................................................................... 8400/9321
---
2019-12-03T18:22:41.5678142Z  finished in 6.373
2019-12-03T18:22:41.5868685Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-03T18:22:41.7584175Z 
2019-12-03T18:22:41.7584423Z running 164 tests
2019-12-03T18:22:44.7624930Z iiii....iii......iii..iiii...i.............................i..i..................i....i...........ii 100/164
2019-12-03T18:22:46.8286575Z .i.i..iiii..iiiiiii............i.........iii.i..........ii......
2019-12-03T18:22:46.8287326Z 
2019-12-03T18:22:46.8291235Z  finished in 5.242
2019-12-03T18:22:46.8477451Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-03T18:22:47.0072469Z 
---
2019-12-03T18:22:49.0624638Z  finished in 2.214
2019-12-03T18:22:49.0812357Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-03T18:22:49.2512756Z 
2019-12-03T18:22:49.2513026Z running 9 tests
2019-12-03T18:22:49.2518556Z iiiiiiiii
2019-12-03T18:22:49.2519522Z 
2019-12-03T18:22:49.2526168Z  finished in 0.171
2019-12-03T18:22:49.2712793Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-03T18:22:49.4434119Z 
---
2019-12-03T18:23:09.4517900Z  finished in 20.180
2019-12-03T18:23:09.4740918Z Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-03T18:23:09.6544278Z 
2019-12-03T18:23:09.6545905Z running 124 tests
2019-12-03T18:23:34.9261641Z .iiiii...i.....i..i...i..i.i.i..i.ii..i.i.....i..i....ii..........iiii..........i....ii...i.......ii 100/124
2019-12-03T18:23:40.1905809Z .i.i.i......iii.i.....ii
2019-12-03T18:23:40.1906376Z 
2019-12-03T18:23:40.1911187Z  finished in 30.717
2019-12-03T18:23:40.1920501Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-03T18:23:40.1923376Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2019-12-03T18:24:54.4177532Z    Compiling rustdoc v0.0.0 (/checkout/src/librustdoc)
2019-12-03T18:24:56.5350808Z error[E0599]: no function or associated item named `new` found for type `std::collections::HashSet<_, std::hash::BuildHasherDefault<rustc_data_structures::fx::FxHasher>>` in the current scope
2019-12-03T18:24:56.5351210Z   --> src/librustdoc/clean/cfg.rs:85:43
2019-12-03T18:24:56.5351518Z    |
2019-12-03T18:24:56.5361708Z 85 |                 let mut seen = FxHashSet::new();
2019-12-03T18:24:56.5363173Z    |                                           ^^^ function or associated item not found in `std::collections::HashSet<_, std::hash::BuildHasherDefault<rustc_data_structures::fx::FxHasher>>`
2019-12-03T18:24:56.5364343Z    = help: items from traits can only be used if the trait is implemented and in scope
2019-12-03T18:24:56.5364343Z    = help: items from traits can only be used if the trait is implemented and in scope
2019-12-03T18:24:56.5364805Z    = note: the following trait defines an item `new`, perhaps you need to implement it:
2019-12-03T18:24:56.5365240Z            candidate #1: `docfs::PathError`
2019-12-03T18:24:56.5413269Z 
2019-12-03T18:24:56.5482668Z error[E0599]: no method named `len` found for type `std::iter::Filter<std::iter::Map<std::slice::Iter<'_, syntax::ast::NestedMetaItem>, for<'r> fn(&'r syntax::ast::NestedMetaItem) -> std::result::Result<clean::cfg::Cfg, clean::cfg::InvalidCfgError> {clean::cfg::Cfg::parse_nested}>, [closure@src/librustdoc/clean/cfg.rs:86:79: 86:97 seen:_]>` in the current scope
2019-12-03T18:24:56.5483092Z   --> src/librustdoc/clean/cfg.rs:90:45
2019-12-03T18:24:56.5483344Z    |
2019-12-03T18:24:56.5483678Z 90 |                     sym::not => if sub_cfgs.len() == 1 {
2019-12-03T18:24:56.5484903Z    |                                             ^^^ method not found in `std::iter::Filter<std::iter::Map<std::slice::Iter<'_, syntax::ast::NestedMetaItem>, for<'r> fn(&'r syntax::ast::NestedMetaItem) -> std::result::Result<clean::cfg::Cfg, clean::cfg::InvalidCfgError> {clean::cfg::Cfg::parse_nested}>, [closure@src/librustdoc/clean/cfg.rs:86:79: 86:97 seen:_]>`
2019-12-03T18:24:58.1773217Z error: aborting due to 2 previous errors
2019-12-03T18:24:58.1774133Z 
2019-12-03T18:24:58.1774804Z For more information about this error, try `rustc --explain E0599`.
2019-12-03T18:24:58.1927090Z error: could not compile `rustdoc`.
---
2019-12-03T18:24:58.2026909Z   local time: Tue Dec  3 18:24:58 UTC 2019
2019-12-03T18:24:58.2575059Z   network time: Tue, 03 Dec 2019 18:24:58 GMT
2019-12-03T18:24:58.2581209Z == end clock drift check ==
2019-12-03T18:24:59.5688679Z 
2019-12-03T18:24:59.5809112Z ##[error]Bash exited with code '1'.
2019-12-03T18:24:59.5843242Z ##[section]Starting: Checkout
2019-12-03T18:24:59.5845479Z ==============================================================================
2019-12-03T18:24:59.5845535Z Task         : Get sources
2019-12-03T18:24:59.5845596Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@GuillaumeGomez GuillaumeGomez force-pushed the cfg-duplicates branch 2 times, most recently from c9026ee to 69e5c9b Compare December 4, 2019 10:53
@GuillaumeGomez
Copy link
Member Author

Ok, so after a few checks, it's not where we thought we should change but instead in the BitAndAssign and BitOrAssign operations.

@GuillaumeGomez GuillaumeGomez changed the title [WIP] Remove potential cfgs duplicates Remove potential cfgs duplicates Dec 4, 2019
@eddyb
Copy link
Member

eddyb commented Dec 5, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Dec 5, 2019

📌 Commit a8ec620 has been approved by eddyb

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 5, 2019
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Dec 6, 2019
Remove potential cfgs duplicates

Fixes rust-lang#66921.

Before going any further (the issue seems to be linked to metadata as far as I can tell). Do you think this is the good place to do it or should it be done before?

r? @eddyb
bors added a commit that referenced this pull request Dec 6, 2019
Rollup of 11 pull requests

Successful merges:

 - #66846 (Make try_mark_previous_green aware of cycles.)
 - #66959 (Remove potential cfgs duplicates)
 - #66988 (Fix angle bracket formatting when dumping MIR debug vars)
 - #66998 (Modified the testcases for VxWorks)
 - #67008 (rustdoc: Add test for fixed issue)
 - #67023 (SGX: Fix target linker used by bootstrap)
 - #67033 (Migrate to LLVM{Get,Set}ValueName2)
 - #67049 (Simplify {IoSlice, IoSliceMut}::advance examples and tests)
 - #67054 (codegen "unreachable" for invalid SetDiscriminant)
 - #67081 (Fix Query type docs)
 - #67085 (Remove boxed closures in address parser.)

Failed merges:

r? @ghost
@bors bors merged commit a8ec620 into rust-lang:master Dec 6, 2019
@GuillaumeGomez GuillaumeGomez deleted the cfg-duplicates branch December 8, 2019 11:15
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jan 8, 2020
…umeGomez

rustdoc: Remove more `#[doc(cfg(..))]` duplicates

This is a follow up to rust-lang#66959.

r? @GuillaumeGomez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustdoc: consolidate multiple identical "supported with *feature* only"
6 participants