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

Rollup of 19 pull requests #47513

Closed
wants to merge 63 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
bdc34fd
fix faulty comment
andjo403 Jan 9, 2018
45cad04
rustdoc: Populate external_traits with traits only seen in impls
ollie27 Jan 10, 2018
f7b4877
Report errors instead of panic!()
Rantanen Jan 12, 2018
f18c52b
Start adding js tests
GuillaumeGomez Dec 12, 2017
53d8ec0
Prepare main.js for tests
GuillaumeGomez Jan 7, 2018
43acd23
Add tester and a few tests
GuillaumeGomez Jan 7, 2018
50bb6ba
Move forward to add rustdoc test
GuillaumeGomez Jan 8, 2018
6952199
End of rustdoc-js tool add into builder
GuillaumeGomez Jan 12, 2018
4cedbfc
fix mispositioned span
gaurikholkar Jan 13, 2018
eb1ada2
revert changes to ui test
gaurikholkar Jan 13, 2018
3c8c505
add ui test
gaurikholkar Jan 13, 2018
026c749
Only run rustdoc-js test suite when nodejs is available
GuillaumeGomez Jan 13, 2018
a22e716
Add a default directory for -Zmir-dump-dir
varkor Jan 14, 2018
2ccc82e
Make dump_mir_dir non-optional
varkor Jan 14, 2018
394b95f
Fix test
varkor Jan 15, 2018
ecd47a9
Don't include bang in macro replacement suggestion
etaoins Jan 14, 2018
b726204
incr.comp.: Cache type_of and some other queries.
michaelwoerister Jan 15, 2018
f9e1b9c
Add NLL test for #45045
chrisvittal Jan 15, 2018
c698496
Reexport -> re-export in documentation section headings
carols10cents Jan 12, 2018
90fcd44
Reexport -> re-export in error messages
carols10cents Jan 12, 2018
e168aa3
Reexport -> re-export in prose and documentation comments
carols10cents Jan 12, 2018
dc44d41
remove noop landing pads in cleanup shims
arielb1 Jan 15, 2018
bfde33f
Add "-lmsvcrt" twice to get rustc to build with the latest mingw64
segevfiner Jan 16, 2018
a4660df
Point at unused arguments for format string
estebank Jan 16, 2018
661e033
in which the private no-mangle lints receive a valued lesson in humility
zackmdavis Jan 16, 2018
fd075c6
implement "only-<platforms>" for test headers
Pulkit07 Jan 16, 2018
1e436eb
return the boolean value directly instead of using if-else
Pulkit07 Jan 16, 2018
567b07c
rename parse_cfg_prefix() to has_cfg_prefix()
Pulkit07 Jan 16, 2018
bd70f0f
add a comment about parsing only prefix in header.rs
Pulkit07 Jan 16, 2018
3a7e247
Fix for older JS versions
GuillaumeGomez Jan 16, 2018
24c3a6d
Add a Docker container for doing automated builds for CloudABI.
EdSchouten Jan 14, 2018
5801f95
Move dist-cloudabi/ into disabled/.
EdSchouten Jan 14, 2018
46c20c0
Remove incorrect `Default::default` links, add a new one
goffrie Jan 16, 2018
1dcfd14
Make non-found module name optional
dominikWin Jan 16, 2018
d769539
fix tidy checks
gaurikholkar Jan 16, 2018
a4e3f36
using tabs in ui tests
gaurikholkar Jan 16, 2018
efe3d69
fix minor errors
gaurikholkar Jan 16, 2018
ae4288f
Integrate dist-cloudabi into dist-various-2.
EdSchouten Jan 16, 2018
f81c2de
Allow a trailing comma in lint_array; fix #47428
mark-i-m Jan 15, 2018
dcf0cd0
Only enable CloudABI builds for x86-64 for now.
EdSchouten Jan 16, 2018
1606341
Document the mingw -lmsvcrt hack better
segevfiner Jan 16, 2018
6defae3
rustc: Spawn `cmd /c` for `.bat` scripts
alexcrichton Jan 16, 2018
eb3da09
Add secondary span pointing at the statement (error span)
estebank Jan 17, 2018
784cdd1
Rollup merge of #47250 - GuillaumeGomez:test-rustdoc-js, r=Mark-Simul…
kennytm Jan 17, 2018
3dc6f3c
Rollup merge of #47302 - andjo403:commentfix, r=michaelwoerister
kennytm Jan 17, 2018
41696f5
Rollup merge of #47313 - ollie27:rustdoc_record_extern_trait, r=Quiet…
kennytm Jan 17, 2018
67dac57
Rollup merge of #47387 - Rantanen:linkchecker-error-msg, r=steveklabnik
kennytm Jan 17, 2018
e8774b4
Rollup merge of #47404 - integer32llc:reexport-to-re-export, r=stevek…
kennytm Jan 17, 2018
9d5dc17
Rollup merge of #47407 - gaurikholkar:master, r=estebank
kennytm Jan 17, 2018
a37d098
Rollup merge of #47426 - varkor:default-mir-dump-dir, r=nikomatsakis
kennytm Jan 17, 2018
0a34e94
Rollup merge of #47427 - EdSchouten:cloudabi-ci, r=alexcrichton
kennytm Jan 17, 2018
2454799
Rollup merge of #47444 - etaoins:dont-include-bang-in-macro-suggestio…
kennytm Jan 17, 2018
b3ff458
Rollup merge of #47455 - michaelwoerister:cache-ty-collect, r=nikomat…
kennytm Jan 17, 2018
83c895a
Rollup merge of #47456 - chrisvittal:nll-tests, r=nikomatsakis
kennytm Jan 17, 2018
4b77463
Rollup merge of #47458 - mark-i-m:lint_array_comma, r=estebank
kennytm Jan 17, 2018
7c76dc0
Rollup merge of #47467 - arielb1:cleanup-shims, r=eddyb
kennytm Jan 17, 2018
73c06bf
Rollup merge of #47479 - zackmdavis:and_the_case_of_the_suggested_dou…
kennytm Jan 17, 2018
7d19bec
Rollup merge of #47481 - estebank:unused-args, r=arielb1
kennytm Jan 17, 2018
eaa7a1f
Rollup merge of #47483 - segevfiner:mingw64-build-hack, r=alexcrichton
kennytm Jan 17, 2018
ee636ed
Rollup merge of #47487 - Pulkit07:foo, r=kennytm
kennytm Jan 17, 2018
0af5b1d
Rollup merge of #47497 - goffrie:patch-1, r=dtolnay
kennytm Jan 17, 2018
6c3420b
Rollup merge of #47498 - dominikWin:missing-module-name, r=petrochenkov
kennytm Jan 17, 2018
5f5688a
Rollup merge of #47505 - alexcrichton:fix-bat-spawn-regression, r=est…
kennytm Jan 17, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ Compatibility Notes
a warning.
- [From the pound escape, lines consisting of multiple `#`s are
now visible][41785]
- [It is an error to reexport private enum variants][42460]. This is
- [It is an error to re-export private enum variants][42460]. This is
known to break a number of crates that depend on an older version of
mustache.
- [On Windows, if `VCINSTALLDIR` is set incorrectly, `rustc` will try
Expand Down Expand Up @@ -2251,10 +2251,10 @@ Rustdoc
-------

* [Fix empty implementation section on some module pages](https://github.com/rust-lang/rust/pull/34536)
* [Fix inlined renamed reexports in import lists](https://github.com/rust-lang/rust/pull/34479)
* [Fix inlined renamed re-exports in import lists](https://github.com/rust-lang/rust/pull/34479)
* [Fix search result layout for enum variants and struct fields](https://github.com/rust-lang/rust/pull/34477)
* [Fix issues with source links to external crates](https://github.com/rust-lang/rust/pull/34387)
* [Fix redirect pages for renamed reexports](https://github.com/rust-lang/rust/pull/34245)
* [Fix redirect pages for renamed re-exports](https://github.com/rust-lang/rust/pull/34245)

Tooling
-------
Expand Down Expand Up @@ -4988,7 +4988,7 @@ Version 0.10 (2014-04-03)
* std: The `vec` module has been renamed to `slice`.
* std: A new vector type, `Vec<T>`, has been added in preparation for DST.
This will become the only growable vector in the future.
* std: `std::io` now has more public-reexports. Types such as `BufferedReader`
* std: `std::io` now has more public re-exports. Types such as `BufferedReader`
are now found at `std::io::BufferedReader` instead of
`std::io::buffered::BufferedReader`.
* std: `print` and `println` are no longer in the prelude, the `print!` and
Expand Down Expand Up @@ -5079,8 +5079,8 @@ Version 0.10 (2014-04-03)
* render standalone markdown files.
* the --test flag tests all code blocks by default.
* exported macros are displayed.
* reexported types have their documentation inlined at the location of the
first reexport.
* re-exported types have their documentation inlined at the location of the
first re-export.
* search works across crates that have been rendered to the same output
directory.

Expand Down Expand Up @@ -5467,7 +5467,7 @@ Version 0.7 (2013-07-03)
incl. `any`, `all`. removed.
* std: The `finalize` method of `Drop` renamed to `drop`.
* std: The `drop` method now takes `&mut self` instead of `&self`.
* std: The prelude no longer reexports any modules, only types and traits.
* std: The prelude no longer re-exports any modules, only types and traits.
* std: Prelude additions: `print`, `println`, `FromStr`, `ApproxEq`, `Equiv`,
`Iterator`, `IteratorUtil`, many numeric traits, many tuple traits.
* std: New numeric traits: `Fractional`, `Real`, `RealExt`, `Integer`, `Ratio`,
Expand Down
7 changes: 5 additions & 2 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ impl<'a> Builder<'a> {
Kind::Test => describe!(check::Tidy, check::Bootstrap, check::DefaultCompiletest,
check::HostCompiletest, check::Crate, check::CrateLibrustc, check::Rustdoc,
check::Linkcheck, check::Cargotest, check::Cargo, check::Rls, check::Docs,
check::ErrorIndex, check::Distcheck, check::Rustfmt, check::Miri, check::Clippy),
check::ErrorIndex, check::Distcheck, check::Rustfmt, check::Miri, check::Clippy,
check::RustdocJS),

Kind::Bench => describe!(check::Crate, check::CrateLibrustc),
Kind::Doc => describe!(doc::UnstableBook, doc::UnstableBookGen, doc::TheBook,
doc::Standalone, doc::Std, doc::Test, doc::Rustc, doc::ErrorIndex, doc::Nomicon,
Expand Down Expand Up @@ -443,7 +445,8 @@ impl<'a> Builder<'a> {
let out_dir = self.stage_out(compiler, mode);
cargo.env("CARGO_TARGET_DIR", out_dir)
.arg(cmd)
.arg("--target").arg(target);
.arg("--target")
.arg(target);

// If we were invoked from `make` then that's already got a jobserver
// set up for us so no need to tell Cargo about jobs all over again.
Expand Down
37 changes: 37 additions & 0 deletions src/bootstrap/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,43 @@ fn path_for_cargo(builder: &Builder, compiler: Compiler) -> OsString {
env::join_paths(iter::once(path).chain(env::split_paths(&old_path))).expect("")
}

#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct RustdocJS {
pub host: Interned<String>,
pub target: Interned<String>,
}

impl Step for RustdocJS {
type Output = ();
const DEFAULT: bool = true;
const ONLY_HOSTS: bool = true;

fn should_run(run: ShouldRun) -> ShouldRun {
run.path("src/test/rustdoc-js")
}

fn make_run(run: RunConfig) {
run.builder.ensure(RustdocJS {
host: run.host,
target: run.target,
});
}

fn run(self, builder: &Builder) {
if let Some(ref nodejs) = builder.config.nodejs {
let mut command = Command::new(nodejs);
command.args(&["src/tools/rustdoc-js/tester.js", &*self.host]);
builder.ensure(::doc::Std {
target: self.target,
stage: builder.top_stage,
});
builder.run(&mut command);
} else {
println!("No nodejs found, skipping \"src/test/rustdoc-js\" tests");
}
}
}

#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub struct Tidy {
host: Interned<String>,
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,8 @@ impl Step for Standalone {

#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct Std {
stage: u32,
target: Interned<String>,
pub stage: u32,
pub target: Interned<String>,
}

impl Step for Std {
Expand Down
17 changes: 14 additions & 3 deletions src/ci/docker/dist-various-2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:16.04
FROM ubuntu:17.10

COPY scripts/cross-apt-packages.sh /scripts/
RUN sh /scripts/cross-apt-packages.sh
Expand All @@ -21,9 +21,12 @@ RUN apt-key adv --batch --yes --keyserver keyserver.ubuntu.com --recv-keys 74DA7
RUN add-apt-repository -y 'deb http://apt.dilos.org/dilos dilos2-testing main'

WORKDIR /tmp
COPY dist-various-2/shared.sh dist-various-2/build-fuchsia-toolchain.sh /tmp/
COPY dist-various-2/build-solaris-toolchain.sh /tmp/
COPY dist-various-2/shared.sh /tmp/
COPY dist-various-2/build-cloudabi-toolchain.sh /tmp/
RUN /tmp/build-cloudabi-toolchain.sh x86_64-unknown-cloudabi
COPY dist-various-2/build-fuchsia-toolchain.sh /tmp/
RUN /tmp/build-fuchsia-toolchain.sh
COPY dist-various-2/build-solaris-toolchain.sh /tmp/
RUN /tmp/build-solaris-toolchain.sh x86_64 amd64 solaris-i386
RUN /tmp/build-solaris-toolchain.sh sparcv9 sparcv9 solaris-sparc

Expand All @@ -44,12 +47,20 @@ ENV \
CC_x86_64_sun_solaris=x86_64-sun-solaris2.10-gcc \
CXX_x86_64_sun_solaris=x86_64-sun-solaris2.10-g++

# FIXME(EdSchouten): Remove this once cc ≥1.0.4 has been merged. It can
# automatically pick the right compiler path.
ENV \
AR_x86_64_unknown_cloudabi=x86_64-unknown-cloudabi-ar \
CC_x86_64_unknown_cloudabi=x86_64-unknown-cloudabi-clang \
CXX_x86_64_unknown_cloudabi=x86_64-unknown-cloudabi-clang++

ENV TARGETS=x86_64-unknown-fuchsia
ENV TARGETS=$TARGETS,aarch64-unknown-fuchsia
ENV TARGETS=$TARGETS,sparcv9-sun-solaris
ENV TARGETS=$TARGETS,wasm32-unknown-unknown
ENV TARGETS=$TARGETS,x86_64-sun-solaris
ENV TARGETS=$TARGETS,x86_64-unknown-linux-gnux32
ENV TARGETS=$TARGETS,x86_64-unknown-cloudabi

ENV RUST_CONFIGURE_ARGS --target=$TARGETS --enable-extended
ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
55 changes: 55 additions & 0 deletions src/ci/docker/dist-various-2/build-cloudabi-toolchain.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/bin/bash
# Copyright 2018 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.

set -eux

# Install prerequisites.
apt-get update
apt-get install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
clang-5.0 \
cmake \
curl \
file \
g++ \
gdb \
git \
lld-5.0 \
make \
python \
sudo \
xz-utils

# Set up a Clang-based cross compiler toolchain.
# Based on the steps described at https://nuxi.nl/cloudabi/debian/
target=$1
for tool in ar nm objdump ranlib size; do
ln -s ../lib/llvm-5.0/bin/llvm-${tool} /usr/bin/${target}-${tool}
done
ln -s ../lib/llvm-5.0/bin/clang /usr/bin/${target}-cc
ln -s ../lib/llvm-5.0/bin/clang /usr/bin/${target}-c++
ln -s ../lib/llvm-5.0/bin/lld /usr/bin/${target}-ld
ln -s ../../${target} /usr/lib/llvm-5.0/${target}

# FIXME(EdSchouten): Remove this once cc ≥1.0.4 has been merged. It
# can make use of ${target}-cc and ${target}-c++, without incorrectly
# assuming it's MSVC.
ln -s ../lib/llvm-5.0/bin/clang /usr/bin/${target}-clang
ln -s ../lib/llvm-5.0/bin/clang /usr/bin/${target}-clang++

# Install the C++ runtime libraries from CloudABI Ports.
echo deb https://nuxi.nl/distfiles/cloudabi-ports/debian/ cloudabi cloudabi > \
/etc/apt/sources.list.d/cloudabi.list
curl 'https://pgp.mit.edu/pks/lookup?op=get&search=0x0DA51B8531344B15' | \
apt-key add -
apt-get update
apt-get install -y $(echo ${target} | sed -e s/_/-/g)-cxx-runtime
6 changes: 3 additions & 3 deletions src/doc/rustdoc/src/the-doc-attribute.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# The `#[doc]` attribute

The `#[doc]` attribute lets you control various aspects of how `rustdoc` does
its job.
its job.

The most basic function of `#[doc]` is to handle the actual documentation
text. That is, `///` is syntax sugar for `#[doc]`. This means that these two
Expand Down Expand Up @@ -143,7 +143,7 @@ pub mod bar {
}
```

The documentation will generate a "Reexports" section, and say `pub use bar::Bar;`, where
The documentation will generate a "Re-exports" section, and say `pub use bar::Bar;`, where
`Bar` is a link to its page.

If we change the `use` line like this:
Expand Down Expand Up @@ -184,7 +184,7 @@ mod bar {
}
```

Now we'll have a `Reexports` line, and `Bar` will not link to anywhere.
Now we'll have a `Re-exports` line, and `Bar` will not link to anywhere.

## `#[doc(hidden)]`

Expand Down
4 changes: 2 additions & 2 deletions src/liballoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
//!
//! This library, like libcore, is not intended for general usage, but rather as
//! a building block of other libraries. The types and interfaces in this
//! library are reexported through the [standard library](../std/index.html),
//! library are re-exported through the [standard library](../std/index.html),
//! and should not be used through this library.
//!
//! ## Boxed values
Expand Down Expand Up @@ -52,7 +52,7 @@
//! ## Collections
//!
//! Implementations of the most common general purpose data structures are
//! defined in this library. They are reexported through the
//! defined in this library. They are re-exported through the
//! [standard collections library](../std/collections/index.html).
//!
//! ## Heap interfaces
Expand Down
11 changes: 4 additions & 7 deletions src/libcore/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,7 @@ impl<T> Option<T> {
}

/// Applies a function to the contained value (if any),
/// or returns a [`default`][] (if not).
///
/// [`default`]: ../default/trait.Default.html#tymethod.default
/// or returns the provided default (if not).
///
/// # Examples
///
Expand All @@ -430,9 +428,7 @@ impl<T> Option<T> {
}

/// Applies a function to the contained value (if any),
/// or computes a [`default`][] (if not).
///
/// [`default`]: ../default/trait.Default.html#tymethod.default
/// or computes a default (if not).
///
/// # Examples
///
Expand Down Expand Up @@ -850,7 +846,7 @@ impl<T: Default> Option<T> {
/// Returns the contained value or a default
///
/// Consumes the `self` argument then, if [`Some`], returns the contained
/// value, otherwise if [`None`], returns the default value for that
/// value, otherwise if [`None`], returns the [default value] for that
/// type.
///
/// # Examples
Expand All @@ -872,6 +868,7 @@ impl<T: Default> Option<T> {
///
/// [`Some`]: #variant.Some
/// [`None`]: #variant.None
/// [default value]: ../default/trait.Default.html#tymethod.default
/// [`parse`]: ../../std/primitive.str.html#method.parse
/// [`FromStr`]: ../../std/str/trait.FromStr.html
#[inline]
Expand Down
8 changes: 4 additions & 4 deletions src/libcore/prelude/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@

#![stable(feature = "core_prelude", since = "1.4.0")]

// Reexported core operators
// Re-exported core operators
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)]
pub use marker::{Copy, Send, Sized, Sync};
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)]
pub use ops::{Drop, Fn, FnMut, FnOnce};

// Reexported functions
// Re-exported functions
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)]
pub use mem::drop;

// Reexported types and traits
// Re-exported types and traits
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)]
pub use clone::Clone;
Expand All @@ -55,7 +55,7 @@ pub use option::Option::{self, Some, None};
#[doc(no_inline)]
pub use result::Result::{self, Ok, Err};

// Reexported extension traits for primitive types
// Re-exported extension traits for primitive types
#[stable(feature = "core_prelude", since = "1.4.0")]
#[doc(no_inline)]
pub use slice::SliceExt;
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/slice/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// a lot of stuff defined here. Let's keep it clean.
//
// Since slices don't support inherent methods; all operations
// on them are defined on traits, which are then reexported from
// on them are defined on traits, which are then re-exported from
// the prelude for convenience. So there are a lot of traits here.
//
// The layout of this file is thus:
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/hir/lowering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2119,7 +2119,7 @@ impl<'a> LoweringContext<'a> {

// Privatize the degenerate import base, used only to check
// the stability of `use a::{};`, to avoid it showing up as
// a reexport by accident when `pub`, e.g. in documentation.
// a re-export by accident when `pub`, e.g. in documentation.
let path = P(self.lower_path(id, &prefix, ParamMode::Explicit, true));
*vis = hir::Inherited;
hir::ItemUse(path, hir::UseKind::ListStem)
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/lint/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ declare_lint! {
declare_lint! {
pub PUB_USE_OF_PRIVATE_EXTERN_CRATE,
Deny,
"detect public reexports of private extern crates"
"detect public re-exports of private extern crates"
}

declare_lint! {
Expand Down
13 changes: 7 additions & 6 deletions src/librustc/lint/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,13 @@ macro_rules! declare_lint {

/// Declare a static `LintArray` and return it as an expression.
#[macro_export]
macro_rules! lint_array { ($( $lint:expr ),*) => (
{
static ARRAY: LintArray = &[ $( &$lint ),* ];
ARRAY
}
) }
macro_rules! lint_array {
($( $lint:expr ),*,) => { lint_array!( $( $lint ),* ) };
($( $lint:expr ),*) => {{
static ARRAY: LintArray = &[ $( &$lint ),* ];
ARRAY
}}
}

pub type LintArray = &'static [&'static &'static Lint];

Expand Down
Loading