mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 02:39:28 +00:00
CI: Fix build with nightly and -D warnings
Add life-time annotations as recommended by the compiler to clarify the flow of life times of arguments to the output.
This commit is contained in:
parent
ed8b29019e
commit
de81fa1dba
3 changed files with 4 additions and 4 deletions
|
@ -501,7 +501,7 @@ mod parser_trait {
|
|||
/// (do not re-implement this function, re-implement
|
||||
/// start_node_impl and finish_node_impl)
|
||||
#[must_use = "The node will be finished when it is dropped"]
|
||||
fn start_node(&mut self, kind: SyntaxKind) -> Node<Self> {
|
||||
fn start_node(&mut self, kind: SyntaxKind) -> Node<'_, Self> {
|
||||
self.start_node_impl(kind, None, NodeToken(()));
|
||||
Node(self)
|
||||
}
|
||||
|
@ -512,7 +512,7 @@ mod parser_trait {
|
|||
&mut self,
|
||||
checkpoint: impl Into<Option<Self::Checkpoint>>,
|
||||
kind: SyntaxKind,
|
||||
) -> Node<Self> {
|
||||
) -> Node<'_, Self> {
|
||||
self.start_node_impl(kind, checkpoint.into(), NodeToken(()));
|
||||
Node(self)
|
||||
}
|
||||
|
|
|
@ -300,7 +300,7 @@ struct Components<'a> {
|
|||
separator: Option<char>,
|
||||
}
|
||||
|
||||
fn component_iter(path: &str) -> Components {
|
||||
fn component_iter(path: &str) -> Components<'_> {
|
||||
Components { path, offset: 0, separator: None }
|
||||
}
|
||||
|
||||
|
|
|
@ -262,7 +262,7 @@ pub fn reserved_properties() -> impl Iterator<Item = (&'static str, Type, Proper
|
|||
}
|
||||
|
||||
/// lookup reserved property injected in every item
|
||||
pub fn reserved_property(name: &str) -> PropertyLookupResult {
|
||||
pub fn reserved_property(name: &str) -> PropertyLookupResult<'_> {
|
||||
thread_local! {
|
||||
static RESERVED_PROPERTIES: HashMap<&'static str, (Type, PropertyVisibility, Option<BuiltinFunction>)>
|
||||
= reserved_properties().map(|(name, ty, visibility)| (name, (ty, visibility, reserved_member_function(name)))).collect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue