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

Small updates for new versions of rustc and clippy #744

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion docs/compiler-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
| `-Oeta` `-Ono-eta` | Disabled | [eta-reduction](#eta-reduction) |
| `-Oprune` `-Ono-prune` | Disabled | [definition-pruning](#definition-pruning) |
| `-Olinearize-matches` `-Olinearize-matches-alt` `-Ono-linearize-matches` | Enabled | [linearize-matches](#linearize-matches) |
| `-Ofloat_combinators` `-Ono-float_combinators` | Enabled | [float-combinators](#float-combinators) |
| `-Ofloat-combinators` `-Ono-float-combinators` | Enabled | [float-combinators](#float-combinators) |
| `-Omerge` `-Ono-merge` | Disabled | [definition-merging](#definition-merging) |
| `-Oinline` `-Ono-inline` | Disabled | [inline](#inline) |
| `-Ocheck-net-size` `-Ono-check-net-size` | Disabled | [check-net-size](#check-net-size) |
Expand Down
2 changes: 1 addition & 1 deletion src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ impl Display for Diagnostic {
}

impl Diagnostic {
pub fn display_with_origin<'a>(&'a self, origin: &'a DiagnosticOrigin) -> impl std::fmt::Display + '_ {
pub fn display_with_origin<'a>(&'a self, origin: &'a DiagnosticOrigin) -> impl std::fmt::Display + 'a {
DisplayFn(move |f| {
match origin {
DiagnosticOrigin::Parsing => writeln!(f, "{self}")?,
Expand Down
1 change: 0 additions & 1 deletion src/fun/check/unbound_vars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ impl Ctx<'_> {
impl Term {
/// Checks that all variables are bound.
/// Precondition: References have been resolved, implicit binds have been solved.

pub fn check_unbound_vars<'a>(
&'a mut self,
scope: &mut Vec<Option<&'a Name>>,
Expand Down
2 changes: 1 addition & 1 deletion src/fun/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ impl<'a> FunParser<'a> {
/// Parses a tag where it may or may not be valid.
///
/// If it is not valid, the returned callback can be used to issue an error.
fn parse_tag(&mut self) -> ParseResult<(Option<Tag>, impl FnOnce(&mut Self) -> Result<(), ParseError>)> {
fn parse_tag(&mut self) -> ParseResult<(Option<Tag>, impl FnOnce(&mut Self) -> ParseResult<()>)> {
let index = self.index;
self.skip_trivia();
let tag = if self.peek_one() == Some('#')
Expand Down
2 changes: 1 addition & 1 deletion src/fun/term_to_net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ enum Place<'t> {
Wire(usize),
}

impl<'t, 'l> EncodeTermState<'t, 'l> {
impl<'t> EncodeTermState<'t, '_> {
/// Adds a subterm connected to `up` to the `inet`.
/// `scope` has the current variable scope.
/// `vars` has the information of which ports the variables are declared and used in.
Expand Down
2 changes: 1 addition & 1 deletion src/hvm/prune.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct PruneState<'a> {
unvisited: HashSet<String>,
}

impl<'a> PruneState<'a> {
impl PruneState<'_> {
fn visit_def(&mut self, name: &str) {
if self.unvisited.remove(name) {
for tree in net_trees(&self.book.defs[name]) {
Expand Down
Loading