Skip to content

Conversation

@hawkw
Copy link
Member

@hawkw hawkw commented Nov 21, 2021

Depends on #1737

This branch removes all remaining extern crate statements. Most of
these are in old code and were not removed when updating to Rust 2018.
Whoops!

Our MSRV no longer requires extern crate, so we don't need these. The
exception is extern crate statements for std and alloc, which are
still the way these libraries are included explicitly when building for
no_std platforms.

In some cases, the tests had to explicitly import the span! and
event! macros at every use, because their names conflict with the
span and event modules in the test support code. Oh well.

Some of the examples still include `#[macro_use] extern crate`
statements for importing macros from `tracing` or `tracing-core`. On a
recent nightly, this results in import conflicts with the implicit
import of the documented crate in doctests:
https://github.com/tokio-rs/tracing/runs/4279736243?check_suite_focus=true

This commit removes all the `extern crate` statements from doctests. Our
MSRV is new enough that `extern crate` is not required on any of the Rust
versions we support.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Depends on #1737

This branch removes all remaining `extern crate` statements. Most of
these are in old code and were not removed when updating to Rust 2018.
Whoops!

Our MSRV no longer requires `extern crate`, so we don't need these. The
exception is `extern crate` statements for `std` and `alloc`, which are
still the way these libraries are included explicitly when building for
`no_std` platforms.

In some cases, the tests had to explicitly import the `span!` and
`event!` macros at every use, because their names conflict with the
`span` and `event` modules in the test support code. Oh well.
@hawkw hawkw requested review from a team, carllerche and davidbarsky as code owners November 21, 2021 20:11
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
@hawkw hawkw force-pushed the eliza/nuke-all-extern-crates branch from 4cbb083 to 86d9d13 Compare November 21, 2021 20:20
Base automatically changed from eliza/no-extern-crates to master November 21, 2021 20:20
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
@hawkw hawkw merged commit f1aa0d4 into master Nov 21, 2021
@hawkw hawkw deleted the eliza/nuke-all-extern-crates branch November 21, 2021 23:19
hawkw added a commit that referenced this pull request Dec 2, 2021
Depends on #1737

This branch removes all remaining `extern crate` statements. Most of
these are in old code and were not removed when updating to Rust 2018.
Whoops!

Our MSRV no longer requires `extern crate`, so we don't need these. The
exception is `extern crate` statements for `std` and `alloc`, which are
still the way these libraries are included explicitly when building for
`no_std` platforms.

In some cases, the tests had to explicitly import the `span!` and
`event!` macros at every use, because their names conflict with the
`span` and `event` modules in the test support code. Oh well.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
@hawkw hawkw mentioned this pull request Dec 2, 2021
hawkw added a commit that referenced this pull request Dec 19, 2021
Depends on #1737

This branch removes all remaining `extern crate` statements. Most of
these are in old code and were not removed when updating to Rust 2018.
Whoops!

Our MSRV no longer requires `extern crate`, so we don't need these. The
exception is `extern crate` statements for `std` and `alloc`, which are
still the way these libraries are included explicitly when building for
`no_std` platforms.

In some cases, the tests had to explicitly import the `span!` and
`event!` macros at every use, because their names conflict with the
`span` and `event` modules in the test support code. Oh well.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
hawkw added a commit that referenced this pull request Dec 19, 2021
Depends on #1737

This branch removes all remaining `extern crate` statements. Most of
these are in old code and were not removed when updating to Rust 2018.
Whoops!

Our MSRV no longer requires `extern crate`, so we don't need these. The
exception is `extern crate` statements for `std` and `alloc`, which are
still the way these libraries are included explicitly when building for
`no_std` platforms.

In some cases, the tests had to explicitly import the `span!` and
`event!` macros at every use, because their names conflict with the
`span` and `event` modules in the test support code. Oh well.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
hawkw added a commit that referenced this pull request Dec 20, 2021
Depends on #1737

This branch removes all remaining `extern crate` statements. Most of
these are in old code and were not removed when updating to Rust 2018.
Whoops!

Our MSRV no longer requires `extern crate`, so we don't need these. The
exception is `extern crate` statements for `std` and `alloc`, which are
still the way these libraries are included explicitly when building for
`no_std` platforms.

In some cases, the tests had to explicitly import the `span!` and
`event!` macros at every use, because their names conflict with the
`span` and `event` modules in the test support code. Oh well.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
kaffarell pushed a commit to kaffarell/tracing that referenced this pull request May 22, 2024
Depends on tokio-rs#1737

This branch removes all remaining `extern crate` statements. Most of
these are in old code and were not removed when updating to Rust 2018.
Whoops!

Our MSRV no longer requires `extern crate`, so we don't need these. The
exception is `extern crate` statements for `std` and `alloc`, which are
still the way these libraries are included explicitly when building for
`no_std` platforms.

In some cases, the tests had to explicitly import the `span!` and
`event!` macros at every use, because their names conflict with the
`span` and `event` modules in the test support code. Oh well.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants