mirror of https://github.com/icedland/iced.git
Update deprecation messages
This commit is contained in:
parent
12559a6987
commit
f6cf7197fd
|
@ -178,7 +178,7 @@ namespace Generator.Encoder.Rust {
|
|||
const TryMethodKind kind = TryMethodKind.Panic;
|
||||
Action docsWriteError = () => writeError(kind);
|
||||
WriteDocs(ctx.Writer, ctx.Method, kind, docsWriteError);
|
||||
ctx.Writer.WriteLine($"#[deprecated(since = \"1.10.0\", note = \"Use {ctx.TryMethodName}() instead\")]");
|
||||
ctx.Writer.WriteLine($"#[deprecated(since = \"1.10.0\", note = \"This method can panic, use {ctx.TryMethodName}() instead\")]");
|
||||
WriteMethod(ctx.Writer, ctx.Method, ctx.MethodName, kind, GenTryFlags.None);
|
||||
using (ctx.Writer.Indent()) {
|
||||
sb.Clear();
|
||||
|
|
|
@ -701,7 +701,7 @@ impl<'a> Decoder<'a> {
|
|||
/// assert_eq!(3, decoder.position());
|
||||
/// ```
|
||||
#[inline]
|
||||
#[deprecated(since = "1.11.0", note = "Use try_set_position() instead")]
|
||||
#[deprecated(since = "1.11.0", note = "This method can panic, use try_set_position() instead")]
|
||||
pub fn set_position(&mut self, new_pos: usize) {
|
||||
self.try_set_position(new_pos).unwrap();
|
||||
}
|
||||
|
|
|
@ -193,7 +193,7 @@ impl Encoder {
|
|||
/// * `bitness`: 16, 32 or 64
|
||||
/// * `capacity`: Initial capacity of the `u8` buffer
|
||||
#[cfg_attr(has_must_use, must_use)]
|
||||
#[deprecated(since = "1.10.0", note = "Use try_with_capacity() instead")]
|
||||
#[deprecated(since = "1.10.0", note = "This method can panic, use try_with_capacity() instead")]
|
||||
#[inline]
|
||||
pub fn with_capacity(bitness: u32, capacity: usize) -> Self {
|
||||
Self::try_with_capacity(bitness, capacity).unwrap()
|
||||
|
|
|
@ -1224,7 +1224,7 @@ impl OpCodeInfo {
|
|||
/// * `operand`: Operand number, 0-4
|
||||
#[cfg_attr(has_must_use, must_use)]
|
||||
#[inline]
|
||||
#[deprecated(since = "1.11.0", note = "Use try_op_kind() instead")]
|
||||
#[deprecated(since = "1.11.0", note = "This method can panic, use try_op_kind() instead")]
|
||||
pub fn op_kind(&self, operand: u32) -> OpCodeOperandKind {
|
||||
self.try_op_kind(operand).unwrap()
|
||||
}
|
||||
|
|
|
@ -226,7 +226,7 @@ impl UsedMemory {
|
|||
/// * Arg 3: `element_size`: Only used if it's a vsib memory operand. Size in bytes of elements in vector index register (4 or 8).
|
||||
#[cfg_attr(has_must_use, must_use)]
|
||||
#[inline]
|
||||
#[deprecated(since = "1.11.0", note = "Use try_virtual_address() instead")]
|
||||
#[deprecated(since = "1.11.0", note = "This method can panic, use try_virtual_address() instead")]
|
||||
pub fn virtual_address<F>(&self, element_index: usize, mut get_register_value: F) -> u64
|
||||
where
|
||||
F: FnMut(Register, usize, usize) -> u64,
|
||||
|
@ -497,7 +497,7 @@ impl InstructionInfo {
|
|||
/// * `operand`: Operand number, 0-4
|
||||
#[cfg_attr(has_must_use, must_use)]
|
||||
#[inline]
|
||||
#[deprecated(since = "1.11.0", note = "Use try_op_access() instead")]
|
||||
#[deprecated(since = "1.11.0", note = "This method can panic, use try_op_access() instead")]
|
||||
pub fn op_access(&self, operand: u32) -> OpAccess {
|
||||
self.try_op_access(operand).unwrap()
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue