Skip to content

Delete use of proc_macro::Span::before/after #391

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jun 8, 2023
Merged

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Jun 8, 2023

@dtolnay dtolnay merged commit bbb6bb8 into master Jun 8, 2023
@dtolnay dtolnay deleted the nobeforeafter branch June 8, 2023 05:34
jonasbb added a commit to jonasbb/serde_with that referenced this pull request Jul 1, 2023
bors bot added a commit to jonasbb/serde_with that referenced this pull request Jul 1, 2023
609: Bump proc-macro2 to unbreak nightly r=jonasbb a=jonasbb

rust-lang/rust#113152
dtolnay/proc-macro2#391

bors r+

Co-authored-by: Jonas Bushart <jonas@bushart.org>
lopopolo added a commit to artichoke/artichoke that referenced this pull request Jul 2, 2023
`proc-macro2` before 1.0.60 is incompatible with the latest nightly
since an unstable feature conditionally used by `proc-macro2` was
renamed.

This breakage had been triggering for a couple of weeks on the periodic
fuzzer builds. This build error additionally blocks the July 2023
dependabot dep update PRs. See:
#2615 (comment).

Fixed with a targeted `cargo update`:

```console
$ cargo update --package proc-macro2
    Updating crates.io index
    Updating proc-macro2 v1.0.59 -> v1.0.63
```

See:

- rust-lang/rust#113152
- dtolnay/proc-macro2#391

Error below:

```console
$ cargo +nightly check
   Compiling proc-macro2 v1.0.59
   Compiling jobserver v0.1.26
    Checking scolapasta-string-escape v0.3.0 (/Users/lopopolo/dev/artichoke/artichoke/scolapasta-string-escape)
    Checking getrandom v0.2.9
   Compiling nom v7.1.3
   Compiling clang-sys v1.6.1
    Checking errno v0.3.1
    Checking io-lifetimes v1.0.11
    Checking regex v1.8.3
    Checking tz-rs v0.6.14
    Checking nix v0.26.2
   Compiling artichoke v0.1.0-pre.0 (/Users/lopopolo/dev/artichoke/artichoke)
    Checking clap v4.3.1
error[E0635]: unknown feature `proc_macro_span_shrink`
  --> /Users/lopopolo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.59/src/lib.rs:92:30
   |
92 |     feature(proc_macro_span, proc_macro_span_shrink)
   |                              ^^^^^^^^^^^^^^^^^^^^^^

    Checking rustix v0.37.19
    Checking rand_core v0.6.4
    Checking spinoso-string v0.24.0 (/Users/lopopolo/dev/artichoke/artichoke/spinoso-string)
    Checking spinoso-exception v0.1.0 (/Users/lopopolo/dev/artichoke/artichoke/spinoso-exception)
    Checking spinoso-symbol v0.4.0 (/Users/lopopolo/dev/artichoke/artichoke/spinoso-symbol)
    Checking spinoso-env v0.2.0 (/Users/lopopolo/dev/artichoke/artichoke/spinoso-env)
    Checking scolapasta-int-parse v0.2.2 (/Users/lopopolo/dev/artichoke/artichoke/scolapasta-int-parse)
   Compiling cc v1.0.79
For more information about this error, try `rustc --explain E0635`.
error: could not compile `proc-macro2` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
```
lopopolo added a commit to artichoke/playground that referenced this pull request Jul 2, 2023
`proc-macro2` before 1.0.60 is incompatible with the latest nightly
since an unstable feature conditionally used by `proc-macro2` was
renamed.

Fixed with a targeted `cargo update`:

```console
$ cargo update --package proc-macro2
    Updating crates.io index
    Updating proc-macro2 v1.0.56 -> v1.0.63
```

See also:

- rust-lang/rust#113152
- dtolnay/proc-macro2#391
- artichoke/artichoke#2619
sholderbach added a commit to sholderbach/nushell that referenced this pull request Jul 6, 2023
Building failed with recent nightly versions due to an outdated
`proc-macro2` version in the lockfile.

See:
rust-lang/rust#113152
dtolnay/proc-macro2#391
sholderbach added a commit to nushell/nushell that referenced this pull request Jul 6, 2023
# Description
Building failed with recent nightly versions due to an outdated
`proc-macro2` version in the lockfile.

See:
rust-lang/rust#113152
dtolnay/proc-macro2#391

# User-Facing Changes
`cargo +nightly build` will succeed again
arpad-m added a commit to neondatabase/neon that referenced this pull request Jul 15, 2023
## Problem

`cargo +nightly doc` is giving a lot of warnings: broken links, naked
URLs, etc.

## Summary of changes

* update the `proc-macro2` dependency so that it can compile on latest
Rust nightly, see dtolnay/proc-macro2#391 and
dtolnay/proc-macro2#398
* allow the `private_intra_doc_links` lint, as linking to something
that's private is always more useful than just mentioning it without a
link: if the link breaks in the future, at least there is a warning due
to that. Also, one might enable
[`--document-private-items`](https://doc.rust-lang.org/cargo/commands/cargo-doc.html#documentation-options)
in the future and make these links work in general.
* fix all the remaining warnings given by `cargo +nightly doc`
* make it possible to run `cargo doc` on stable Rust by updating
`opentelemetry` and associated crates to version 0.19, pulling in a fix
that previously broke `cargo doc` on stable:
open-telemetry/opentelemetry-rust#904
* Add `cargo doc` to CI to ensure that it won't get broken in the
future.

Fixes #2557

## Future work
* Potentially, it might make sense, for development purposes, to publish
the generated rustdocs somewhere, like for example [how the rust
compiler does
it](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_driver/index.html).
I will file an issue for discussion.
nya3jp pushed a commit to nya3jp/cros-bazel that referenced this pull request Nov 29, 2023
Fixes rust-lang/rust#113152
for nightly cargo in alchemist.
By including dtolnay/proc-macro2#391.

BUG=None
TEST=portage/tools/run_tests.sh

Change-Id: I948123131596f2063f538274173ff1027dc573aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/bazel/+/5064256
Reviewed-by: Matt Stark <msta@google.com>
Commit-Queue: Li-Yu Yu <aaronyu@google.com>
Tested-by: Li-Yu Yu <aaronyu@google.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant