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

Cannot compile bat: error[E0282]: type annotations needed for Box<_> #3043

Closed
brenton-at-pieces opened this issue Jul 25, 2024 · 0 comments · Fixed by #3045
Closed

Cannot compile bat: error[E0282]: type annotations needed for Box<_> #3043

brenton-at-pieces opened this issue Jul 25, 2024 · 0 comments · Fixed by #3045
Labels
bug Something isn't working upstream-error A bug in an upstream component

Comments

@brenton-at-pieces
Copy link
Contributor

I am trying to build bat, but running into an error.

% rustup -V
rustup 1.27.1 (54dd3d00f 2024-04-24)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.80.0 (051478957 2024-07-21)`

% cargo build
   Compiling libc v0.2.149
   Compiling proc-macro2 v1.0.79
   Compiling unicode-ident v1.0.4
   Compiling serde v1.0.199
   Compiling memchr v2.6.4
   Compiling pkg-config v0.3.25
   Compiling regex-syntax v0.8.2
   Compiling hashbrown v0.14.1
   Compiling equivalent v1.0.1
   Compiling strsim v0.10.0
   Compiling fnv v1.0.7
   Compiling rustix v0.38.21
   Compiling ident_case v1.0.1
   Compiling bitflags v2.4.0
   Compiling cfg-if v1.0.0
   Compiling utf8parse v0.2.1
   Compiling colorchoice v1.0.0
   Compiling anstyle-parse v0.2.0
   Compiling anstyle v1.0.0
   Compiling tinyvec_macros v0.1.0
   Compiling itoa v1.0.3
   Compiling anstyle-query v1.0.0
   Compiling crc32fast v1.3.2
   Compiling tinyvec v1.6.0
   Compiling same-file v1.0.6
   Compiling anstream v0.6.4
   Compiling powerfmt v0.2.0
   Compiling once_cell v1.19.0
   Compiling anyhow v1.0.86
   Compiling aho-corasick v1.1.2
   Compiling clap_lex v0.6.0
   Compiling winnow v0.5.18
   Compiling deranged v0.3.11
   Compiling indexmap v2.2.6
   Compiling walkdir v2.5.0
   Compiling ryu v1.0.11
   Compiling serde_json v1.0.85
   Compiling adler v1.0.2
   Compiling either v1.8.0
   Compiling log v0.4.20
   Compiling num-conv v0.1.0
   Compiling thiserror v1.0.61
   Compiling percent-encoding v2.2.0
   Compiling safemem v0.3.3
   Compiling time-core v0.1.2
   Compiling unicode-bidi v0.3.8
   Compiling line-wrap v0.1.1
   Compiling itertools v0.13.0
   Compiling form_urlencoded v1.1.0
   Compiling miniz_oxide v0.7.1
   Compiling unicode-normalization v0.1.22
   Compiling time v0.3.34
   Compiling quick-xml v0.31.0
   Compiling quote v1.0.35
error[E0282]: type annotations needed for `Box<_>`
  --> /Users/brenton/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.34/src/format_description/parse/mod.rs:83:9
   |
83 |     let items = format_items
   |         ^^^^^
...
86 |     Ok(items.into())
   |              ---- type must be known at this point
   |
help: consider giving `items` an explicit type, where the placeholders `_` are specified
   |
83 |     let items: Box<_> = format_items
   |              ++++++++

   Compiling regex-automata v0.4.3
   Compiling syn v2.0.57
   Compiling idna v0.3.0
   Compiling semver v1.0.23
   Compiling bugreport v0.5.0
   Compiling base64 v0.21.0
   Compiling bytemuck v1.12.1
For more information about this error, try `rustc --explain E0282`.
error: could not compile `time` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

If I run cargo update, I can then build.

@brenton-at-pieces brenton-at-pieces added the bug Something isn't working label Jul 25, 2024
@keith-hall keith-hall added the upstream-error A bug in an upstream component label Jul 26, 2024
cyqsimon added a commit to cyqsimon/bat that referenced this issue Jul 26, 2024
keith-hall added a commit that referenced this issue Jul 26, 2024
Bump time to 0.3.36 (fixes #3043)
domenicomastrangelo added a commit to domenicomastrangelo/bat that referenced this issue Nov 9, 2024
* Add syntax mapping for `/etc/pacman.conf`

* Write changelog

* Bump git2 from 0.18.2 to 0.18.3 (sharkdp#2977)

Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.18.2 to 0.18.3.
- [Changelog](https://github.com/rust-lang/git2-rs/blob/master/CHANGELOG.md)
- [Commits](rust-lang/git2-rs@git2-0.18.2...git2-0.18.3)

---
updated-dependencies:
- dependency-name: git2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump flate2 from 1.0.28 to 1.0.30 (sharkdp#2980)

Bumps [flate2](https://github.com/rust-lang/flate2-rs) from 1.0.28 to 1.0.30.
- [Release notes](https://github.com/rust-lang/flate2-rs/releases)
- [Commits](rust-lang/flate2-rs@1.0.28...1.0.30)

---
updated-dependencies:
- dependency-name: flate2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump itertools from 0.12.1 to 0.13.0 (sharkdp#2978)

Bumps [itertools](https://github.com/rust-itertools/itertools) from 0.12.1 to 0.13.0.
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md)
- [Commits](rust-itertools/itertools@v0.12.1...v0.13.0)

---
updated-dependencies:
- dependency-name: itertools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump thiserror from 1.0.53 to 1.0.61 (sharkdp#2979)

Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.53 to 1.0.61.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](dtolnay/thiserror@1.0.53...1.0.61)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump semver from 1.0.21 to 1.0.23 (sharkdp#2981)

Bumps [semver](https://github.com/dtolnay/semver) from 1.0.21 to 1.0.23.
- [Release notes](https://github.com/dtolnay/semver/releases)
- [Commits](dtolnay/semver@1.0.21...1.0.23)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Make EscapeSequenceOffsetsIterator pub, add fns to get indices

* Update expand_tabs to use bat's ANSI iterator

* Update CHANGELOG.md

* ci: support aarch64 statically-linked binary (sharkdp#2992)

* Add `--strip-ansi` option

* Add `--strip-ansi=auto` option

When using `auto`, escape sequences will be stripped unless printing
plain text.

* Add ANSI stripping to bat-as-a-library

* Update CHANGELOG.md

* Update README.md to mention `--strip-ansi`

* Add flox install

* Fix cmder link

* Bump walkdir from 2.4.0 to 2.5.0 (sharkdp#3018)

Bumps [walkdir](https://github.com/BurntSushi/walkdir) from 2.4.0 to 2.5.0.
- [Commits](BurntSushi/walkdir@2.4.0...2.5.0)

---
updated-dependencies:
- dependency-name: walkdir
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump encoding_rs from 0.8.33 to 0.8.34 (sharkdp#3020)

Bumps [encoding_rs](https://github.com/hsivonen/encoding_rs) from 0.8.33 to 0.8.34.
- [Commits](hsivonen/encoding_rs@v0.8.33...v0.8.34)

---
updated-dependencies:
- dependency-name: encoding_rs
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump unicode-width from 0.1.11 to 0.1.13 (sharkdp#3019)

Bumps [unicode-width](https://github.com/unicode-rs/unicode-width) from 0.1.11 to 0.1.13.
- [Commits](unicode-rs/unicode-width@v0.1.11...v0.1.13)

---
updated-dependencies:
- dependency-name: unicode-width
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump anyhow from 1.0.78 to 1.0.86 (sharkdp#3021)

Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.78 to 1.0.86.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](dtolnay/anyhow@1.0.78...1.0.86)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* add CFML syntax

* update CHANGELOG

* Update the Protobuf sobmodule (fixes sharkdp#2542)

* Bump time to 0.3.36 (fixes sharkdp#3043)

* Write changelog

* Add syntax mapping for kubernetes config files

* Write changelog

* Associate JSON-LD `.jsonld` files with `json` syntax (fixes sharkdp#3036)

Use PR instead of Issue # number in CHANGELOG.

Clean up (unify) CHANGELOG.

* Add options present in --help to the man page

* Add options present in --help to Bash completion

* Add --cache-dir to Fish completion

* Add --no-* options to Bash/Zsh completions

* Add options generated by completions to the man page

* Update CHANGELOG

* Support merging `--style` arguments

The `overrides_with` clap builder option was removed
because it interfered with the matcher's ability to
retain all occurrences of `--style`.

The behavior it covered is expressed within the new
`forced_style_components` function.

* Update clap/docs for merging `--style` arguments

* Join env var options with "=" instead of " "

Joining them with a space was causing certain styles (e.g. `-grid`) to
be misinterpreted as a separate option.

* Add integration tests for merging styles

A huge thanks to @einfachIrgendwer0815 for helping me make sure
these tests work under the MSRV CI job.

* First StyleComponentList should remove from 'auto' style.

This happens when there are no `--style` arguments other than the one
passed in as a command line argument.

Prior to this change, removing a style component (e.g. `--style=-numbers`)
would remove the component from an empty style component set, resulting
in no styles at all. That behaviour was less intuitive than the new
behaviour, which starts out with the default components and
removes the line numbers.

* Update changelog

* Bump expect-test from 1.4.1 to 1.5.0 (sharkdp#3055)

Bumps [expect-test](https://github.com/rust-analyzer/expect-test) from 1.4.1 to 1.5.0.
- [Changelog](https://github.com/rust-analyzer/expect-test/blob/master/CHANGELOG.md)
- [Commits](rust-analyzer/expect-test@v1.4.1...v1.5.0)

---
updated-dependencies:
- dependency-name: expect-test
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump indexmap from 2.2.6 to 2.3.0 (sharkdp#3057)

Bumps [indexmap](https://github.com/indexmap-rs/indexmap) from 2.2.6 to 2.3.0.
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/master/RELEASES.md)
- [Commits](indexmap-rs/indexmap@2.2.6...2.3.0)

---
updated-dependencies:
- dependency-name: indexmap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump ansi_colours from 1.2.2 to 1.2.3 (sharkdp#3058)

Bumps [ansi_colours](https://github.com/mina86/ansi_colours) from 1.2.2 to 1.2.3.
- [Commits](https://github.com/mina86/ansi_colours/commits)

---
updated-dependencies:
- dependency-name: ansi_colours
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add option `--binary`

`--binary` allows to specify how to deal with binary content. Current
options are not printing anything or treating the binary data as text.

* Test `--binary=as-text`

* Update CHANGELOG

* Run syntax highlighting when `--binary=as-text`

* Don't output default theme info to piped stdout

* Reinforce tests for `--list-themes`

* Bump plist from 1.6.0 to 1.7.0 (sharkdp#3076)

Bumps [plist](https://github.com/ebarnard/rust-plist) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/ebarnard/rust-plist/releases)
- [Commits](ebarnard/rust-plist@v1.6.0...v1.7.0)

---
updated-dependencies:
- dependency-name: plist
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump serde from 1.0.199 to 1.0.209 (sharkdp#3077)

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.199 to 1.0.209.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](serde-rs/serde@v1.0.199...v1.0.209)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Associate GeoJSON `.geojson` files with `json` syntax (fixes sharkdp#3083)

* Update Chinese version translation of README.md

* Map `*.mkd` files to `Markdown` syntax (sharkdp#3061)

* Bump globset from 0.4.14 to 0.4.15 (sharkdp#3090)

Bumps [globset](https://github.com/BurntSushi/ripgrep) from 0.4.14 to 0.4.15.
- [Release notes](https://github.com/BurntSushi/ripgrep/releases)
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md)
- [Commits](BurntSushi/ripgrep@globset-0.4.14...ignore-0.4.15)

---
updated-dependencies:
- dependency-name: globset
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump once_cell from 1.19.0 to 1.20.1 (sharkdp#3091)

Bumps [once_cell](https://github.com/matklad/once_cell) from 1.19.0 to 1.20.1.
- [Changelog](https://github.com/matklad/once_cell/blob/master/CHANGELOG.md)
- [Commits](matklad/once_cell@v1.19.0...v1.20.1)

---
updated-dependencies:
- dependency-name: once_cell
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump git2 from 0.18.3 to 0.19.0 (sharkdp#3092)

Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.18.3 to 0.19.0.
- [Changelog](https://github.com/rust-lang/git2-rs/blob/master/CHANGELOG.md)
- [Commits](rust-lang/git2-rs@git2-0.18.3...git2-0.19.0)

---
updated-dependencies:
- dependency-name: git2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump flate2 from 1.0.30 to 1.0.34 (sharkdp#3093)

Bumps [flate2](https://github.com/rust-lang/flate2-rs) from 1.0.30 to 1.0.34.
- [Release notes](https://github.com/rust-lang/flate2-rs/releases)
- [Changelog](https://github.com/rust-lang/flate2-rs/blob/main/CHANGELOG.md)
- [Commits](rust-lang/flate2-rs@1.0.30...1.0.34)

---
updated-dependencies:
- dependency-name: flate2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Partially revert "Make -pp override --paging and vice versa when passed as a later argument. (sharkdp#2660)"

This partially reverts commit e2bf85e.

* Add tests against issue sharkdp#2731

* Add partial override of -pp and --paging

* Update changelog

* Bump nix from 0.26.4 to 0.29

* Make .debdiff imply .diff using syntax_mapping toml

Closes sharkdp#2940

* Add CHANGELOG entry for .debdiff => diff

* Move from unix-family to common

* Bump clircle from 0.5.0 to 0.6.0 (sharkdp#3117)

Bumps [clircle](https://github.com/niklasmohrin/clircle) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/niklasmohrin/clircle/releases)
- [Commits](niklasmohrin/clircle@v0.5.0...v0.6.0)

---
updated-dependencies:
- dependency-name: clircle
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump encoding_rs from 0.8.34 to 0.8.35 (sharkdp#3119)

Bumps [encoding_rs](https://github.com/hsivonen/encoding_rs) from 0.8.34 to 0.8.35.
- [Commits](hsivonen/encoding_rs@v0.8.34...v0.8.35)

---
updated-dependencies:
- dependency-name: encoding_rs
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump toml from 0.8.9 to 0.8.19 (sharkdp#3121)

Bumps [toml](https://github.com/toml-rs/toml) from 0.8.9 to 0.8.19.
- [Commits](toml-rs/toml@toml-v0.8.9...toml-v0.8.19)

---
updated-dependencies:
- dependency-name: toml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump grep-cli from 0.1.10 to 0.1.11 (sharkdp#3120)

Bumps [grep-cli](https://github.com/BurntSushi/ripgrep) from 0.1.10 to 0.1.11.
- [Release notes](https://github.com/BurntSushi/ripgrep/releases)
- [Changelog](https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md)
- [Commits](BurntSushi/ripgrep@grep-cli-0.1.10...0.1.11)

---
updated-dependencies:
- dependency-name: grep-cli
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: cyqsimon <28627918+cyqsimon@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ethan P. <eth-p+git@hidden.email>
Co-authored-by: Tong Zhaoqi <1661610563@qq.com>
Co-authored-by: Bryan Honof <bryanhonof@gmail.com>
Co-authored-by: Driss Boumlik <drissboumlik.dev@gmail.com>
Co-authored-by: Brenton Bostick <brenton@pieces.app>
Co-authored-by: Michael Vorburger <mike@vorburger.ch>
Co-authored-by: Keith Hall <keith-hall@users.noreply.github.com>
Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
Co-authored-by: einfachIrgendwer0815 <85333734+einfachIrgendwer0815@users.noreply.github.com>
Co-authored-by: Mikael Vaaltola <mikael.vaaltola@mapbox.com>
Co-authored-by: flytam <tanjiahui2015@foxmail.com>
Co-authored-by: Keith Hall <kingkeith+git@gmail.com>
Co-authored-by: Fabio Valentini <decathorpe@gmail.com>
Co-authored-by: Jacek Generowicz <jacg@my-post-office.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream-error A bug in an upstream component
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants